Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / May 2007

Tip: Looking for answers? Try searching our database.

how to realize an abort-button?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
b.schmidt - 22 May 2007 14:18 GMT
hi,

I have an add-in with a custom task pane in Word 2007, where I import
the recipients for a mail merge. Unfortunately the whole application
freezes, when I import many contacts (>1000), so it's impossible to
click on an abort-button.

Does anyone know a good way, how to realize an abort-button? I tried
running the add-in as a different thread, but then I always get errors.

Can someone help me?

best regards,
bernhard
Ken Slovak - [MVP - Outlook] - 23 May 2007 23:23 GMT
Use a loop to import, that way the button can click.

The real problem is the freeze. Use loops of 200 or under, make sure to
release all of your objects regularly, don't use dot operators that will
create internal variables that will not be released until the procedure
finishes.

If you are running against Exchange you can also run into the 256 RPC
channel limit so small loops are good for that.

Using SetColumns to limit the number of properties that are loaded is a good
optimization. Just remember to use ResetColumns at the end of your
procedure.

There are other optimization tricks but for that we'd need to know the
language you're using.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> hi,
>
[quoted text clipped - 10 lines]
> best regards,
> bernhard
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.