Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] barkertj@gmail.com is offline
external usenet poster
 
Posts: 1
Default Can you trick Word into thinking a file is locked by another user?

I'm working on a document-management project at my company.

as you know, when you open a file that is on a network drive, office
apps will say 'file X is being modified by Person do you want to
open in read-only mode'. I want to see if I can emulate this behaviour
programatically to lock documents

I've read that office apps use a ~$XXX.tmp as a lock-file.
So, to test, i created a document, made edits and then copied the .doc
and .tmp to another directory

I thought that if i then went to view the file (with it's .tmp file
still there) that it would tell me it was locked. But alas no.

I also sent these files to someone else to see if it would say I had
it locked but Word ignored that too.

If anyone has any creative ideas in this area let me know!

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
AdamV AdamV is offline
external usenet poster
 
Posts: 2
Default Can you trick Word into thinking a file is locked by another user?

Surely to do this you dould just open the file for reading using whatever
language your program is written in, you don't have to open it with Word for
it to get a file lock in the OS. For it to get a useful ock giving the user's
info then you would have ot create a temp file in the right format.
But a good DM should not let the users anywhere near the file store directy
anyway, it should all be brokered by the DMS so that is what would return a
"this file is in use" message, not the native implementation.
--
Adam Vero
MCP, MOS Master, MLSS, CWNA
http://veroblog.wordpress.com
http://www.meteorit.co.uk


" wrote:

I'm working on a document-management project at my company.

as you know, when you open a file that is on a network drive, office
apps will say 'file X is being modified by Person do you want to
open in read-only mode'. I want to see if I can emulate this behaviour
programatically to lock documents

I've read that office apps use a ~$XXX.tmp as a lock-file.
So, to test, i created a document, made edits and then copied the .doc
and .tmp to another directory

I thought that if i then went to view the file (with it's .tmp file
still there) that it would tell me it was locked. But alas no.

I also sent these files to someone else to see if it would say I had
it locked but Word ignored that too.

If anyone has any creative ideas in this area let me know!


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
Let Word stop thinking on its own.. grawl liekkje Microsoft Word Help 1 July 31st 06 01:44 AM
Nasty trick saving hyperlinks in crashes Greg New Users 11 February 7th 06 09:57 AM
Access locked by another user for mailmerge Dixie Mailmerge 1 November 8th 05 10:22 PM
File opening read-only & file locked by XXX user prompt laralea Microsoft Word Help 2 June 30th 05 02:55 PM
Run OS in RAM Speed Trick !:?) New Users 0 April 16th 05 07:19 PM


All times are GMT +1. The time now is 09:47 AM.

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"