robgest
Technical User
- Sep 1, 2011
- 3
Having an issue with this one.
Getting this error when I run this VB.... The second "ActiveDocument" part will all highlight yellow.
Getting this error when I run this VB.... The second "ActiveDocument" part will all highlight yellow.
Code:
Private Sub CommandButton1_Click()
chDir1 = "C:\CoA\"
chDir2 = "P:\CoA2\"
ActiveDocument.SaveAs FileName:=chDir1 & Format(Now(), "mm_dd_yyyy hh mm AMPM"), FileFormat:=wdFormatDocument, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False
ActiveDocument.SaveAs FileName:=chDir2 & Format(Now(), "mm_dd_yyyy hh mm AMPM"), FileFormat:=wdFormatPDF, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False
End Sub