Reply
 
Thread Tools Display Modes
  #1   Report Post  
Mhamid Mhamid is offline
Junior Member
 
Posts: 0
Default Macro to remove password and save word 2010 doc

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
  #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
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Macro to remove password and save word 2010 doc

You'll need the password to open the password-protected file. It may be
difficult to automate the task, unless all of the files make use of the
same password, of course.

Stefan Blom
Microsoft Word MVP




On 2015-10-20 18:35, Mhamid wrote:
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




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro help Word 2010 Gryphonn Microsoft Word Help 4 October 27th 14 11:38 AM
Issue with Record Macro feature Word 2010 mpdsal Microsoft Word Help 1 October 23rd 12 12:18 AM
Word 2010 Macro John[_17_] Microsoft Word Help 2 May 3rd 12 10:13 PM
Macro's not working in word 2010 louisechapman Microsoft Word Help 0 October 25th 10 11:19 AM
How can I remove Chinese characaters in Word 2010 beta Help jimcran Microsoft Word Help 0 December 18th 09 05:14 PM


All times are GMT +1. The time now is 05:34 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"