none
Fetch the name of the file that user enters in "Save As" dialog RRS feed

  • Question

  • Hi,

    I am showing name of the word document in the pane of word add - in. If a document (say "Doc1") is opened and the user does a "Save As", changes the name of the document to say "Doc2". On what event can I fetch the new name "Doc2" and update on my pane?

    Tuesday, March 15, 2011 5:27 AM

Answers

  • Hello,

    Since the Word object model doesn't provide a way for this, I'm afraid using a timer is what they left for you. 


    Regards from Belarus (GMT + 2),
    Andrei Smolin
    Add-in Express Team Leader
    Tuesday, March 15, 2011 3:30 PM
  • I've got another idea: you intercept the SaveAs command and use either Dialogs(wdFileSaveAs) or Word.Application.FileDialog to carry out the saveAs and get the new file name.
    Regards from Belarus (GMT + 2),
    Andrei Smolin
    Add-in Express Team Leader
    Wednesday, March 16, 2011 4:14 AM

All replies

  • Hello,

    Since the Word object model doesn't provide a way for this, I'm afraid using a timer is what they left for you. 


    Regards from Belarus (GMT + 2),
    Andrei Smolin
    Add-in Express Team Leader
    Tuesday, March 15, 2011 3:30 PM
  • I've got another idea: you intercept the SaveAs command and use either Dialogs(wdFileSaveAs) or Word.Application.FileDialog to carry out the saveAs and get the new file name.
    Regards from Belarus (GMT + 2),
    Andrei Smolin
    Add-in Express Team Leader
    Wednesday, March 16, 2011 4:14 AM