![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I've got an addin (VSTO 2008 on Outlook2007) that, upon startup, at user
option may make a web service call to get information to populate a bunch of postItems in a folder. The web service call could take some time. If the number of rows returned is large, creating the associated postItems could take some time. In previous efforts, there have been ways to manipulate the mouse icon for the application to indicate that things are happening. I can find examples for doing that for forms but not for the application in general. Is there a best practice (other than "don't do that" ![]() Also, while working through the returned data and creating postItems, is it necessary to pause occasionally and allow display refresh events to process so that the user can see what's happening? If so, is there a best practice for doing that? |
Ads |
#2
|
|||
|
|||
![]()
The actual Web service call can be made asynchronously using a background
worker thread. Any processing using the Outlook object model should always be done in the main thread however, otherwise you crash or hang Outlook. If the processing can take a long time using the Outlook object model then you can divide it into a few parts and use a timer to determine when each piece of the processing is done, say 10 items at a time or whatever. If that's not possible due to needing to have all the data available simultaneously then you could put up a progress dialog or something like that to inform the user the process was ongoing. Calling to Application.DoEvents() will allow the Windows message pump to run and will allow the progress dialog to update. I usually do that once per loop iteration if I'm running a long-running process. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Mark Lawrence" Mark wrote in message ... I've got an addin (VSTO 2008 on Outlook2007) that, upon startup, at user option may make a web service call to get information to populate a bunch of postItems in a folder. The web service call could take some time. If the number of rows returned is large, creating the associated postItems could take some time. In previous efforts, there have been ways to manipulate the mouse icon for the application to indicate that things are happening. I can find examples for doing that for forms but not for the application in general. Is there a best practice (other than "don't do that" ![]() Also, while working through the returned data and creating postItems, is it necessary to pause occasionally and allow display refresh events to process so that the user can see what's happening? If so, is there a best practice for doing that? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Code running the Categories button | Ailish | Outlook - Using Forms | 2 | April 1st 08 10:19 AM |
Strange error numbers when running code | vfr_stinger@hotmail.com | Outlook and VBA | 8 | May 9th 07 11:15 AM |
VBA Code not running until editor is open | gamename | Outlook and VBA | 0 | May 17th 06 05:42 PM |
Script error while running .Net Code | Muhammad Usman | Outlook - Using Forms | 1 | May 4th 06 12:17 PM |
Running query from Access Form commmand using VBA code | Berny | Outlook and VBA | 4 | January 16th 06 02:12 PM |