mgonzalez07
08-19-2005, 07:26 PM
Hi, I'm new to VBA and to this forum and I could really use your help. I am trying to write a macro that will save a file as whatever is written in a Text Form Field. This is what I have so far but it seems that the file is always saved as "FORMTEXT name" I can not get rid of "FORMTEXT" Does anyone have any ideas?
Sub Save()
strVar = ActiveDocument.Bookmarks("Text9").Range
ActiveDocument.SaveAs FileName:=strVar, FileFormat:= _
wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _
True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _
False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
End Sub
Sub Save()
strVar = ActiveDocument.Bookmarks("Text9").Range
ActiveDocument.SaveAs FileName:=strVar, FileFormat:= _
wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _
True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _
False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
End Sub