![]() |
#1
|
|||
|
|||
![]()
Trying to create a macro to save document to my documents folder using the following bookmark name ("ActName"). however, it saves the file with wording "FORMTEXT" and then the bookmark name
FORMTEXT ABC Account.docm I would like it to save this way: ABC Account.docm. Currently using the following code: Private Sub CommandButton11_Click() ActiveDocument.SaveAs FileName:=ActiveDocument.Bookmarks("ActName").Rang e.Text End Sub Thank you, |
#2
|
||||
|
||||
![]()
As the bookmark is from a form field, the error relates to the fact that the field construction is toggled. It would be preferable to leave the field locked and use
Code:
ActiveDocument.SaveAs FileName:=ActiveDocument.FormFields("ActName").Result
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
![]()
Thanks, I'll give that a go as well.
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
SixSigmaGuy | Word VBA | 5 | 05-03-2016 10:49 AM |
Find Bookmark, move to bookmark, execute code, repeat | raymm3852 | Word VBA | 10 | 04-15-2016 06:21 PM |
![]() |
ch1325 | Excel Programming | 8 | 04-11-2016 04:24 PM |
![]() |
Ahmed AbuZekry | Word VBA | 2 | 03-23-2015 02:14 AM |
![]() |
tinfanide | Excel Programming | 4 | 11-05-2011 01:40 AM |