joebrown116
New Member
- Joined
- Sep 7, 2017
- Messages
- 2
Code:
Sub Test()
Dim DCM1 As String
DCM1 = Mid(ThisDocument.Name, 1, Len(ActiveDocument.Name) - 4)
ActiveDocument.SaveAs2 FileName:="C:\Users\UI488820\Desktop\Logo" & DCM1 & "" & "test" & ".docx", FileFormat:= _
wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles _
:=False, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts _
:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False, CompatibilityMode:=14
End Sub
Get the 5251 error (can't remember exact number) saving the file path or file name . Here's some of the code above.
Please help!
Last edited by a moderator: