View Single Post
  #2   Report Post  
Mhamid Mhamid is offline
Junior Member
 
Posts: 0
Default

Quote:
Originally Posted by Mhamid View Post
Hello,

I am looking for a vba code/macro that will remove a password and salve the document as current file name. Each file has a different name so macro has to be able to identify the current file name and save the file.

Would someone know how to do this?


Thank you,
Miriam
Hello,

I've been trying to create the macro that would save the word document with the current file name, but the name changes so I am trying to get the ActiveDocument.FullName to work to save the file with the given document name.

How can I make this code work?


Code:
 Dim SaveName As String
SaveName = ActiveDocument.FullName

    ActiveDocument.SaveAs fileName:=ActiveDocument.FullName, FileFormat:= _
        wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles _
        :=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts _
        :=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
        SaveAsAOCELetter:=False, HTMLDisplayOnlyOutput:=False, MaintainCompat:= _
        False
        
End Sub
Thank you,
Miriam