none
Add Mandatory attribute in Ribbon Office Addin RRS feed

  • Question

  • Hi,

    I need to give a textbox field in Ms office Addin where user has to provide input to textbox(mandatory).so while saving the Document i need to validate textbox empty or not ,if empty i need to enforce the user to enter data to textbox before saving it.how can i do that in vs2010 can any please help me on this.


    suresh

    Wednesday, December 5, 2012 5:11 AM

Answers

  • I don't understand what you mean by "using DSOfile for Office AddIn"?

    You'd need to work with each application's event that triggers when a Save command is called. In Word, for example, that would be DocumentBeforeSave. Excel and PowerPoint each have their own event. When the event is triggered, check for the entry. If it's not present, cancel the event and show the user a message.


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, December 5, 2012 7:48 AM
    Moderator

All replies

  • You need to provide more information

    1. Version of Office

    2. Office application


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, December 5, 2012 7:07 AM
    Moderator
  • Thanks for your reply 

    1)version of  office 2007 and 2010

    2)Word,Excel,PPt

    Actually iam using DSOfile for Office AddIn



    suresh

    Wednesday, December 5, 2012 7:38 AM
  • I don't understand what you mean by "using DSOfile for Office AddIn"?

    You'd need to work with each application's event that triggers when a Save command is called. In Word, for example, that would be DocumentBeforeSave. Excel and PowerPoint each have their own event. When the event is triggered, check for the entry. If it's not present, cancel the event and show the user a message.


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, December 5, 2012 7:48 AM
    Moderator