S
Sally Green
Using vba code and Word 2003, I need to be able to suggest a file name in the
Save As dialog using underscores to seperate words, eg My_filename.doc
I have tried all manner of things to do this and have partially suceeded
using:
ActiveDocument.SaveAs "My_filename"
However, I need the Save As dialog to show so that the user can select the
relevant folder. As this folder can change from user to user I can't default
the path into the code. I need a NoPrompt argument like the Save Method.
I've also used:
ActiveDocument.BuiltInProperties(wdPropertyTitle)="My_filename" but that
then suggest My.doc as the filename, everything after the underscore is
dropped out.
I've also tried the WordBasic.SetDocumentProperty "Title",0, "My_Filename"
- same problem.
And Documents.Save NoPrompt:=False with the same frustrating result.
I found a useful article in
http://word.mvps.org/faqs/macrosvba/SetDefFilenameContent.htm
The work around worked really well, it placed my very long filename with
appropriately placed underscores into the Title Property and the .show on the
wdDialogFileSummaryInfo showed the title. However, when my code gets to the:
Dialogs(wdDialogFileSaveAs).Show
the Save As dialog box is displayed but the suggested filename does not pick
up the full name from the Document Properties - Title. Everything after the
undersecore is dropped out.
Is there a known fix for this.
My request in brief is to be able to display the Save As dialog with a
suggested name, that includes underscores.
Any help on this would be appreciated.
Thanks
SG
Save As dialog using underscores to seperate words, eg My_filename.doc
I have tried all manner of things to do this and have partially suceeded
using:
ActiveDocument.SaveAs "My_filename"
However, I need the Save As dialog to show so that the user can select the
relevant folder. As this folder can change from user to user I can't default
the path into the code. I need a NoPrompt argument like the Save Method.
I've also used:
ActiveDocument.BuiltInProperties(wdPropertyTitle)="My_filename" but that
then suggest My.doc as the filename, everything after the underscore is
dropped out.
I've also tried the WordBasic.SetDocumentProperty "Title",0, "My_Filename"
- same problem.
And Documents.Save NoPrompt:=False with the same frustrating result.
I found a useful article in
http://word.mvps.org/faqs/macrosvba/SetDefFilenameContent.htm
The work around worked really well, it placed my very long filename with
appropriately placed underscores into the Title Property and the .show on the
wdDialogFileSummaryInfo showed the title. However, when my code gets to the:
Dialogs(wdDialogFileSaveAs).Show
the Save As dialog box is displayed but the suggested filename does not pick
up the full name from the Document Properties - Title. Everything after the
undersecore is dropped out.
Is there a known fix for this.
My request in brief is to be able to display the Save As dialog with a
suggested name, that includes underscores.
Any help on this would be appreciated.
Thanks
SG