A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to tell if a file lock is released?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 1st 06, 04:42 PM posted to microsoft.public.outlook.program_vba
Culverin
external usenet poster
 
Posts: 26
Default How to tell if a file lock is released?

Hi:

Outlook has a lock on the FRMCACHE.DAT file that it doesn't release until it
is closed. My script closes Outlook and then attempts to delete the
FRMCACHE.DAT file. Depending on how long Outlook takes to close, my script
can sometimes execute the delete line before the lock is released, generating
a runtime "permission denied" abend. Since Outlook can close at varying
speeds what I'd like to do is delay execution of the delete statement until
the lock is free.

Two solutions to this probelm come to mind.

1. Is there a way programatically to tell in VB Script if there is a lock
on a file? What is the syntax? I would think that testing the lock property
in aloop until it is freed would work.

2. Pausing execution for a fixed interval. Is there a VB Script "Pause",
"Delay" or "Break" statement for runtime? I've tried all of these and
nothing works.

Thanks for your help.
Ads
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ANN:PlainSight Desktop Calendar 2.1 Released [email protected] Outlook - Calandaring 1 March 5th 06 09:16 PM
ANN:PlainSight Desktop Calendar 2.1 Released [email protected] Outlook - General Queries 1 March 5th 06 09:01 PM
what will OE users do when IE 7 is released? David DeRolph Outlook Express 4 February 15th 06 10:01 PM
NK2csv v.06 beta is released Josh Outlook - General Queries 0 January 16th 06 08:01 PM
NK2csv v.06 beta is released Vinas Outlook - Using Contacts 0 January 16th 06 07:34 PM


All times are GMT +1. The time now is 02:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.