CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2002
    Location
    England
    Posts
    530

    Opening a password protected word file

    Hi

    I'm writing an app to open a password protected word document. Fear not, the worriers among you - it is my own document with a password I do not recall. However, to be honest, I would use it elsewhere if the need arose...!

    Right, the problem is not opening the file, this I can do, it is the time it takes to attempt to open it before the error is returned due to an incorrect password. It takes almost one second. If going through a password of 6 characters in length including chars 0 to 9, A to Z and a to z this is clearly going to take some time. Forget about a 7 character password - my cpu would melt! Though, to be honest, I'm very sure the password 5 chars long, which should take about one day max to crack (if 'zzzzz', but it isn't that, so less than a day in reality). And yes, I have a poor spec PC.

    I'm using the following to open the doc (referencing word 9 object library):

    Code:
        Set mobjWord = New Word.Application
        Set mobjDoc = mobjWord.Documents.Open(txtFileName.Text, , , , Password, , , Password)
    So, is there a quicker way of opening a word file?

    Cheers

  2. #2
    Join Date
    Nov 2004
    Location
    LA. California Raiders #1 AKA: Gangsta Yoda™
    Posts
    616

    Re: Opening a password protected word file

    I dont think so but you could try searching for a VBA Password Recovery program. There are allot out there, many for free and legit too. Try any of these from my Google search.

    http://www.google.com/search?hl=en&q...sword+Recovery
    VB/Office Guru™ (AKA: Gangsta Yoda™)
    VB Forums - Super Moderator 2001-Present

    Microsoft MVP 2006-2011

    Please use [code]your code goes in here[/code] tags when posting code.

    Senior Software Engineer MCP, BSEE, CET
    VS 2012 Premium, VS 6.0 Enterprise SP6, VSTO, Office Ultimate 2010, Windows 7 Ultimate
    Star Wars Gangsta Rap SE Reputations & Rating Posts Office Primary Interop AssembliesAdvanced VB/Office Guru™ Word SpellChecker™.NETAdvanced VB/Office Guru™ Word SpellChecker™ VB6Outlook Global Address ListVB6/Crystal Report Ex.VB6/CR Print Setup Dialog Ex.

  3. #3
    Join Date
    Nov 2004
    Location
    LA. California Raiders #1 AKA: Gangsta Yoda™
    Posts
    616

    Re: Opening a password protected word file

    VB/Office Guru™ (AKA: Gangsta Yoda™)
    VB Forums - Super Moderator 2001-Present

    Microsoft MVP 2006-2011

    Please use [code]your code goes in here[/code] tags when posting code.

    Senior Software Engineer MCP, BSEE, CET
    VS 2012 Premium, VS 6.0 Enterprise SP6, VSTO, Office Ultimate 2010, Windows 7 Ultimate
    Star Wars Gangsta Rap SE Reputations & Rating Posts Office Primary Interop AssembliesAdvanced VB/Office Guru™ Word SpellChecker™.NETAdvanced VB/Office Guru™ Word SpellChecker™ VB6Outlook Global Address ListVB6/Crystal Report Ex.VB6/CR Print Setup Dialog Ex.

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    530

    Re: Opening a password protected word file

    A couple of the apps in the second link look promising. I'll download and try em out. Had to laugh at the one that says it takes between 2 and 4 weeks - not quite as slow as mine, but still a while!

    Many thanks.

  5. #5
    Join Date
    Mar 2012
    Posts
    1

    Re: Opening a password protected word file

    Hi,
    You should try to "Office Password Recovery" software to recover password protected word file.

    In google search
    http://www.microsoft-office-password-recovery.khozz.com

  6. #6
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Opening a password protected word file

    And you should try to read the date of the post you just answered.
    It is 7 years old, and I think the OP might have meanwhile eaten the Word file byte by byte.
    Please don't revive old threads.

  7. #7
    Join Date
    Apr 2013
    Posts
    1

    Re: Opening a password protected word file

    hi
    you should try PDS Password Unlocker software which recover and unlock word file password easily.

  8. #8
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Opening a password protected word file

    And 1 year after the last time it was resurrected here is yet another new user responding to a long dead question.
    I wonder what makes people create an account then respond to a question that is several years old????
    Always use [code][/code] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured