+ Reply to Thread
Results 1 to 6 of 6

Open word doc from excel - Doc locked for editing error (me)

  1. #1
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    640

    Open word doc from excel - Doc locked for editing error (me)

    I have created the following code, and from my extensive googleing it should work however, every time I try to open the word doc it producres the error message informing me the document is locked for editing. I have cancelled out via the task manager and rerun the code and the message appears so it is something in the code that opens the doc that is trying to re-open it but I can't work out what is happening to do that.

    Can anyone see the error of my ways and suggest an alternative or fix to this problem?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Open word doc from excel - Doc locked for editing error (me)

    it works for me with the 2 lines amended

    Please Login or Register  to view this content.
    Note

    Test this with a file that you know is not locked
    (your original file may still be locked)
    Last edited by kev_; 04-04-2018 at 09:07 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    640

    Re: Open word doc from excel - Doc locked for editing error (me)

    Thanks, it works now when I use another doc (I have used many in this goal to work)

    Is there a way of error trapping this to stop the dialogue box telling me to open a read only option and just produce a msgbox saying file locked?

  4. #4
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    640

    Re: Open word doc from excel - Doc locked for editing error (me)

    It only works once, as soon as I have opened a doc using the macro it shows it as locked for editing.

    I have attempted to release the object from memory and used task manager to manually close the word doc but it does not stop the locked message appearing.

    WHY IS THIS HAPPENING???

    It is extremely frustrating

    Code so far

    Please Login or Register  to view this content.
    Last edited by Sc0tt1e; 04-04-2018 at 10:41 AM.

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Open word doc from excel - Doc locked for editing error (me)

    Looks like your document and Word Application are both in limbo

    Where in the code are you ...
    - saving the document?
    - closing it?
    - closing the application?

    Try this - it should do everything above
    Please Login or Register  to view this content.
    Last edited by kev_; 04-04-2018 at 04:55 PM.

  6. #6
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    640

    Re: Open word doc from excel - Doc locked for editing error (me)

    Yeah that works, hahaha

    Didn't even think about closing it out, thought the unset would do it all for me

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel Locked for Editing by Me
    By newbie4 in forum Excel General
    Replies: 13
    Last Post: 01-30-2023, 04:22 AM
  2. locked for editing error when reassigning a macro button
    By mmccra2858 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-01-2016, 08:26 AM
  3. Replies: 0
    Last Post: 06-25-2014, 09:59 AM
  4. File Locked for Editing When Not Open
    By sam314159 in forum Excel General
    Replies: 3
    Last Post: 05-10-2010, 01:38 PM
  5. Can i make .docx as locked for editing by 'another users' in Word 2007
    By champs in forum Word Formatting & General
    Replies: 1
    Last Post: 03-28-2009, 01:39 AM
  6. [SOLVED] locked for editing in Excel
    By raginbull69 in forum Excel General
    Replies: 1
    Last Post: 08-17-2006, 07:15 PM
  7. [SOLVED] Trying to Open Excel File, But its says file is locked for editing
    By Smeeta Geary in forum Excel General
    Replies: 1
    Last Post: 09-20-2005, 09:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1