More Outlook Resource Sites

Microsoft Developer Network (MSDN)

FAQs and other general resources

Login

login
password
Remember me

You will need to register and log in if you want to download the source code for the Microsoft Outlook Programming book. The forums and code sharing areas are open to both registered and non-registered visitors.

share code 02-Sep-2010 22:33

Looking for help with Outlook programming projects — VSTO, add-ins, VBA, custom Outlook forms, etc.? You′ve come to the right place!

NEW! >> Subscribe to this site via RSS. For more RSS options, see the complete list of feeds on our main news page.

 

Code level: advanced    Code area: Outlook and .NET Printer Friendly Version
Title: Inspector wrapper w/ Wordmail VSTO 2005 vb.net
Description: The sample builds on Sue's inspector wrapper code and adds support for wordmail. The code structure is identical to the original code: three code modules -- ThisApplication.vb, InspectorHelperClass.vb, and InspectorWrapper.vb The approach is minimalistic, I left out some things that were in Sue's original sample. Developed and tested using vb.net, VSTO 2005, and OL2003.
Date: 05-Feb-2008  07:04
Code level: advanced
Code area: Outlook and .NET
Posted by: Stephan Mankart
Body:
All 18comments
Page [ 1 2 Next >>  
  05-Feb-2008  07:16   
For getting this to work, I learnt most from posts by Ken Slovak... if you have to dig deeper in the issue of wordmail support, you should check out his many posts on the issue.
 
  05-May-2008  05:33   
Works perfect, How can I place the button or bar at the standard toolbar or first on before the standard toolbar?
  14-May-2008  01:55   
Sorry for not getting back to your question earlier. The answer is to my knowledge negative, anyway. I don't think it is possible to access the standard toolbar (or hide/delete it) in OL mails with Word as the editor (pls don't ask me why, I don't understand this limitation either). Also, I haven't seen anything that allows you to specify the order of the toolbars, all i know is the 'top', 'bottom'... position tag of a toolbar.

If you find something out on any of these points, pls let me know, too.
  19-May-2008  11:08   
It is definitely not possible to access the Standard toolbar through Wordmail. Any customization needs to be done on a custom toolbar.

The value of the CommandBar.RowIndex property determines a bar's position relative to others in the same docking area.
  05-Jun-2008  01:22   
Hi, I had an issue with putting a custom image for the CommandBarButton icon when I am using this code.

I had two wrapper classes which is one used for Explorer and one for Inspector. In explorer, I used the previous code released by Sue and it works fine. But for Inspector objects, since I need to embed the WordMail support into the wrapper class, I have to use this code. This code is working great.

I just had a small problem when I am calling CreateToolbar function from _oword_WindowActivate event handler, I could not get the custom image that I have in my resource into the button. Is it because when the WindowActivate event called, it's too late to embed the image into the CommandBarButton? If I need to do the button creation before the WindowActivate function yet still able to make use the WordMail support, where should I put the toolbar generation code?

Any suggestion would be appreciated.
  05-Jun-2008  01:34   
Hi.

I have never tried to add an image to the button, so i'm not sure what the problem might be. I think the timing, to insert the image when creating the button sounds perfectly fine to me. did you check, or play around with the button style property? maybe there is one that allows icons to be added. but that's only a wild guess.... sorry can't be of more help here.
  05-Jun-2008  01:47   
Yeah, i supposed the timing could be the issue. Because in the ExplorerWrapper class, I called the CreateToolbar function before the Inspector is loaded/activated. And it worked fine for explorer. But since we called the CreateToolbar in the WindowActivate event to handle the WordMail issue, the image can not be loaded into the button icon.

Another issue is with the flickering toolbar, do you have suggestion on how to stop the flickering? It's kinda annoying :)
  05-Jun-2008  01:56   
I know what you mean, but I didn't solve this at the time. If I remember well, Ken Slovak posted a comment somewhere, how to minimize the flickering... see if you can find that. And, come back to tell us ;)
  05-Jun-2008  02:18   
I will search for that. I think I've seen it somewhere. He mentioned that there is a property within the Word.Application object that can be set to eliminate the flickering. But I did not use it at the time, because I haven;t got this issue until now.

I got another issue that I just found now, if you open more than one inspector (let's say open 3 or 4) and then you close the latest inspector that you opened. After that, when you switching the Inspector window, all inspector toolbars become invinsible. It seems that the _intId is set to be the id of the last opened inspector object, so that when that inspector object deleted. The intId is returned to be 0 or some other numbers. Have you experienced this before?
  05-Jun-2008  02:48   
Ups. That doesn't sound good either. I remember vaguely there was something like that, but only in bizare cases and everything came in order when one of the remaining inspector was selected again (gained focus), which happens anyway.

To be honest, the project for which I was writing the code, was killed... when wrapping it up I posted the code, so someone else could take advantage of it. If I would have been aware that the code is that buggy, I wouldn't have posted it in the first place...

I don't have the time to go back to it at the moment. Maybe at some point in the future, but not in the coming weeks. I hope you can trouble shoot it yourself, and that you share the results with us...
Page [ 1 2 Next >>  
Post your comment



name        email