Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wdDialogFileSummaryInfo

Status
Not open for further replies.

risslsu

Programmer
Joined
Jan 13, 2004
Messages
18
Location
US
I am trying to change the name of a word document that had been merged. I can't use saveas because I cannot assume the user wants to save the document, but I would like to change the title of the document for the suggested name if they should chose to save it.

I have found the folling example of code, but it doesn't seem to be working.

myDialog = Dialogs(wdDialogFileSummaryInfo)
myDialog.Title = "New Title"

Can someone please help?

Marissa
 

Are you define the wdDialogFileSummaryInfo first?
Try using this before your code.

Code:
#DEFINE wdDialogFileSummaryInfo	86

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Yes, it is defined in my program. Should I reference Dialogs as oWord.Dialogs where oWord is my Word object?

Is this even valid code to use in VFP?
 
oWord.Dialogs worked.

But I didn't solve my initial problem. I do not want the name of my document to be "Form Letters 1". I want to change the name, but without issuing a saveas because I still want to user to have the option to save or not.

Is this possible?
 
Just for reference I figured it out.

oWord.ActiveDocument.ActiveWindow.Caption = l_newtitle

This command changed the filename in the title bar.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top