When saving a new document for the first time, WORD suggest a name for the
new file

This is sometimes the first part of the first sentence in the document or
the title in Document Properties


My question is : can I compose myself that tempory name (in a VBA-code -
tempory filename = content of a bookmark) and this whitout really saving
the document.


My aim is that when users are saving the file, the dialogbox "Save" at item
"filename" suggest the name as defined in the bookmark.


thanks - paul

Re: Saving a new file - suggestion for the file-name by Helmut

Helmut
Tue Jan 27 09:53:25 CST 2004

Hi Paul,
rather a workaround than a bulletproof solution, but anyway,
try this:
Sub FileSave()
Dim s As String
s = ActiveDocument.Bookmarks("MyMark").Range.Text
' can't think of anthing else than
If Left(ActiveDocument.Name, 8) = "Document" Then
With Dialogs(wdDialogFileSaveAs)
.Name = s
.Show
End With
End If
End Sub

Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word XP, Win 98


Re: Saving a new file - suggestion for the file-name by Jay

Jay
Tue Jan 27 17:02:55 CST 2004

Hi, Paul,

Besides the approach Helmut showed you, another way around the problem
is shown at http://word.mvps.org/FAQs/MacrosVBA/SetDefFilename.htm.

"paul" <a@b.com> wrote:

>
>When saving a new document for the first time, WORD suggest a name for the
>new file
>
>This is sometimes the first part of the first sentence in the document or
>the title in Document Properties
>
>
>My question is : can I compose myself that tempory name (in a VBA-code -
>tempory filename = content of a bookmark) and this whitout really saving
>the document.
>
>
>My aim is that when users are saving the file, the dialogbox "Save" at item
>"filename" suggest the name as defined in the bookmark.
>
>
>thanks - paul
>
>


--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://www.mvps.org/word