Reputation: 20223
I have this VBA code in a Word for Mac 2016
ActiveDocument.SaveAs FileName:= _
"forMerrin.htm", FileFormat:= _
wdFormatFilteredHTML, LockComments:=False, Password:="", AddToRecentFiles _
:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts _
:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
It returns:
Run-time error: "5460"
A file error has occurred.
(forMErrin.htm)
I tried SaveAs2 but still the same problem.
Upvotes: 0
Views: 157
Reputation: 7850
The filename needs to include the path - "forMerrin.htm" only tells Word what you want to name the file but not where you want to put it.
Upvotes: 1