Removing Excel password.

  • Thread starter Thread starter Tim Marsden
  • Start date Start date
T

Tim Marsden

Hi,

I am using the following code ( VB.NET) to try and remove a password from a
Excel Workbook.

objWB.SaveAs(Filename:=objWB.FullName,
FileFormat:=Excel.XlFileFormat.xlWorkbookNormal, Password:="",
WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False)

But it is not working.

I can set different passwords, but when I try to remove it, it does not
work.

Any ideas
 
Hello Tim,

Change:
Password:=""

To:
Password:=Empty

Hope this helps,

Kris
 
Forgot about the WriteResPassword:="".

Change that one to:
WriteResPassword:=Empty to remove that password as well.

Hope this helps,

Kris
 
Hi Tim,

Have you tried Kris's suggestion?
If you still have any concern on this issue, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Thanks,

All is resolved now. I was due to the fact the Workbook was protected.

Tim
 
Hi Tim,

I am glad that the problem is resolved.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top