J
johnnykunst
I have created a macro to generate filename from entries in a form in Word 2003 and save with this filename. The macro uses bookmarks to identify the text to be used. It works fine if the bookmark is for a legacy text form field, but if used with a drop down form field it generates a save error
Private Sub CommandButton1_Click(
Call RunSpellchec
Dim pStr As Strin
pStr = "C:\Users\John\Desktop\" 'Your director
pStr = pStr + ActiveDocument.Bookmarks("text").Range.Tex
pStr = pStr + "
pStr = pStr + ActiveDocument.Bookmarks("ward").Range.Tex
pStr = pStr + " .doc
ActiveDocument.SaveAs FileName:=pSt
Dim sCode As Strin
MsgBox "Your Intelligence report was saved to the central WINTEL inbox for processing & emailing. No further action is required; it is now safe to close the document
End Su
Any help would be greatly appreciated- is there any way to use the selected text item from the drop down, or, if not, to copy & paste the text into a text form field which the macro will recognise?
Private Sub CommandButton1_Click(
Call RunSpellchec
Dim pStr As Strin
pStr = "C:\Users\John\Desktop\" 'Your director
pStr = pStr + ActiveDocument.Bookmarks("text").Range.Tex
pStr = pStr + "
pStr = pStr + ActiveDocument.Bookmarks("ward").Range.Tex
pStr = pStr + " .doc
ActiveDocument.SaveAs FileName:=pSt
Dim sCode As Strin
MsgBox "Your Intelligence report was saved to the central WINTEL inbox for processing & emailing. No further action is required; it is now safe to close the document
End Su
Any help would be greatly appreciated- is there any way to use the selected text item from the drop down, or, if not, to copy & paste the text into a text form field which the macro will recognise?