Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jun 2010
    Location
    sydney
    Posts
    164
    Thanks
    22
    Thanked 16 Times in 14 Posts

    Word 2010 and file locking

    When a document was being edited in Word 2007 the document file was locked - this doesn't happen with Word 2010

    Anyway to restore the document file locking behaviour of Word 2007 in Word 2010

    Thanks nw

  2. #2
    Silver Lounger
    Join Date
    Mar 2014
    Location
    Forever West
    Posts
    2,072
    Thanks
    0
    Thanked 259 Times in 248 Posts
    Quote Originally Posted by northwood2222 View Post
    When a document was being edited in Word 2007 the document file was locked - this doesn't happen with Word 2010

    Anyway to restore the document file locking behaviour of Word 2007 in Word 2010

    Thanks nw
    Have you put file locking in Word's Help? Several items about it there.

  3. #3
    2 Star Lounger
    Join Date
    Jun 2010
    Location
    sydney
    Posts
    164
    Thanks
    22
    Thanked 16 Times in 14 Posts
    Quote Originally Posted by Berton View Post
    Have you put file locking in Word's Help? Several items about it there.
    The items I can see there seem to be about document protection

    I should have made more precise. I'm referring to regular file system locks that are used to prevent program A opening file 'fred' if program B is holding a lock on 'fred' see ==>> LockFile function

    Word 2007 would prevent my program opening a file 'it' was working on if my program tried to open it. Its not happening with Word 2010. Frankly I'm amazed - its CompSci 101 stuff.

    I guess it could be Windows 10 - the API belongs to it rather than Office. But then I'm doubly amazed.

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    File locking is controlled by the OS, not by applications. Depending on your setup, it's possible to use Office in a shared mode that allows multiple users to open & edit the same document.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    2 Star Lounger
    Join Date
    Jun 2010
    Location
    sydney
    Posts
    164
    Thanks
    22
    Thanked 16 Times in 14 Posts
    Quote Originally Posted by macropod View Post
    File locking is controlled by the OS, not by applications.
    Programmer here - file locks are done by the OS at the request of the application - read the link in my previous post

    Word 2007

    I would open and edit mytext.docx in Word 2007, whilst it was unsaved and open I would to open the same file in my program (semantic analysis) - the open would fail with an OS error code indicating the file was locked - I would look aside and see I did indeed have the file open in Word and what's more I hadn't saved my changes. So, either I would save and close the file in Word and hit Retry in my program, or I would Cancel my program and finish off whatever I was doing in Word and run my program once I saved and closed the file in Word.


    Word 2010

    I open and edit mytext.docx in Word 2010, whilst it is open I open the same file in my program. The file opens without an OS error code indicating the file is locked. Consequently my program reads the previously saved version, produces the same results as last time I ran it and I'm left scratching my head

    I would like Word 2010 to lock the file as its predecessor did. It's amazing that MS can introduce convoluted, intrusive mechanisms such UAC and Smartscreen to prevent users shooting themselves in the foot - yet get rid of something that's been doing just that since the 1960's (PDP/8, OS360)

    BTW a DOCX is a zip, inside they look like this

    Capture.JPG

    Note its mainly XML (actually it's all XML those .rel files are XML under the covers) - what's XML suitable for:- not human consumption, that's for sure; but it's excellent computer software fodder, and there's an abundance of XML parsers to help digest it. The XML is compliant with the ISO/IEC OOXML standards.

    nw

Posting Permissions

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