macro to save doc as contents of a specified field

D

Dave

I would like to save my doc named as the contents of a
bookmark which will change with each use.
 
D

Doug Robbins

Hi Dave,

If the bookmark is one that is assigned to a formfield. use

ActiveDocument.SaveAs ActiveDocument.FormFields("bookmarkname").Result

If its not a formfield, use

ActiveDocument.SaveAs ActiveDocument.Bookmarks("bookmarkname").Range.Text

You can probably just use the latter in the former case as well.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top