exporting items calls item_read for each item

C

Carl Hoeg

I have a rather advanced custom task form (using OL2000), that
includes a lock file system. Each time one of these tasks are opened,
a lock file is created (in a separate public folder).

My problem concerns exporting all items to Excel. My export function
used to work perfectly, until I introduced the lock file system (that
also works fine by itself).

In the export sub, I do a typical "For Each objTmp In itmItems" ..
however, this calls the Item_read sub for each item, which in turn
creates a lock file.

I have tried to ".save" the item before "next" (item), which I hoped
would call Item_write (which removes the lock file), but it doesn't
work :(

Suggested solutions:
1) in item_read, check if the item was opened "by code". If so, do not
create lock file -- not sure if this is possible, how can I check if
the item_read was called due to a code reference or by an in-cell
edit? Is it possible to pass values to item_read?

2) force a call of Item_write, like I've described above (".save") --
How can I get this to work?

3) solve the export of items in another way. Is it possible to export
my data to Excel without calling Item_read for each item?

Regards,
Carl
 
S

Sue Mosher [MVP]

Item_Write will fire if you 'dirty' the item by changing some property value.

You might also consider using CDO, instead of Outlook objects. See http://www.cdolive.com/cdo10.htm for essential property tag information.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top