I have written vba code behind word to open a template that has been partially completed from another template. Open a blank template form partially populate and save it with a site specific name. I then want to use the partially complete template form as a master that is opened completely populated and saved using a form button that updates the file name with the date and time and saves as a protected word doc(not template) ...all good and working fine Word 2003 SP3 .... upgrade the 2000 version I hear you say but the user is very happy with 2000 so that is not currently possible. Under 2000 I get the above error with debug highlighting the ActiveDocument SaveAs statement.
What is wrong with the code below ...ideas please!!!
Private Sub CommandButton1_Click()
' Macro recorded 6/11/2008 by Tony Nieroba NBA Computing
Dim dd, strClient, strMP As String
If ActiveDocument.ReadOnlyRecommended = True Then
MsgBox "Document Already Saved - Save Button Blocked"
dd = Format(Now, "yymmdd-hhmm")
'MsgBox dd ..
strClient = ActiveDocument.CustomDocumentProperties("Client").Value
strMP = ActiveDocument.CustomDocumentProperties("MainPath").Value
ActiveDocument.SaveAs FileName:=dd & "-" & strClient & "-SPRINKLER SYSTEMS.doc", FileFormat:=wdFormatDocument _
, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="BAZZA", ReadOnlyRecommended:=True, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _