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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word - Inserting the doc title into the sava as dialog box

Status
Not open for further replies.

chinster99

Technical User
Apr 7, 2003
18
GB
Hi,

I am trying to write a macro that inserts the title of the word document into the save as dialog box.

I am going to use: ActiveDocument.saveas (???????)
Dialogs(wdDialogFileSaveAs).Show

to insert a value into the dialog box, however I need some code to call the title of the document.

Thanks

Leo
 
the code your looking for is probably ActiveDocument.Name

I suggest changing your code slightly as I couldn't get the code you have to work properly.

Set MyDialog = Dialogs(wdDialogFileSaveAs)
MyDialog.Name = ActiveDocument.Name
MyDialog.Show

This will allow you to set the name in the box with code.

I don't understand the point entirely though.
SaveAs (Current Doc Name) is the same as just Save.
 
Sorry, I didn't make myself clear.

When the user opens the template, a summary box is displayed where the title, author etc is shown. The user will enter something for the title.

I then want the title of the document to be displayed in the saveas dialog box (the documnet is currently un-named.

I tried using: wdPropertyTitle but it seems to only display the first letter and not the whole string
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top