View Single Post
  #5   Report Post  
Posted to microsoft.public.word.pagelayout
bsieloff bsieloff is offline
external usenet poster
 
Posts: 6
Default Link the File name to a bookmark when saving the file

Ahh.. Macro. Very cool, it works!

One more question... I tried to setup the "SaveAs" fuction as well and did
not find the correct syntax, can you look at this and correct my mistake?
Thanks again

Sub FileSave()
'
' FileSave Macro
' Saves the active document or template
'
With ActiveDocument
.SaveAs .FormFields("Company_Name").Result
End With


End Sub
Sub FileSaveAs()
'
' FileSaveAs Macro
' Saves a copy of the document in a separate file
'
With ActiveDocument
Dialogs .SaveAs.FormFields("Company_Name").Result
End With



End Sub




"Doug Robbins - Word MVP" wrote:

It needs to be located in the template from which you are creating the
document.

See the article "What do I do with macros sent to me by other newsgroup
readers to help me out?" at:

http://www.word.mvps.org/FAQs/Macros...eateAMacro.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"bsieloff" wrote in message
...
Looks like this will do it.... but I'm not sure where this statement needs
to
be placed. anywhere on the document? How do I get in the "mode" to enter
the statement, IE. Insert field?

Thanks for you help, and baby stepping me through

-B

"Doug Robbins - Word MVP" wrote:

Use the .Result property of the formfield to get the information that has
been entered into it

With ActiveDocument
.SaveAs .FormFields("formfieldbookmarkname").Result
End With



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"bsieloff" wrote in message
...
I would like to have the file save as one of my bookmarks when I save
the
file for the first time. Usually the default is the first several
words
at
the beginning of the document, but I would like to have it default to
one
of
the form fields I have the users type in. Is that possible?

Thanks
-B