![]() |
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
|
|||
|
|||
![]()
Hi,
I developed a Outlook COM AddIn using VB6 with Office 2000 to 2003 SP3). The user should be able to click a button that is placed on a custom temporary CommandBar. I save and restore the position and state of this CommandBar using .Type, .Left, .Top, .Visible, .RowIndex and .Width properties. If Outlook is used as mail-editor, everything is really fine. But most people seem to use Word as Editor and the problem starts here. Problem 1: The CommandBar position switches. If I set my CommandBar second to the menubar, the RowIndex returns me 4 as position (strange). If I set RowIndex to 4 in a later call, after opening a new inspector, my CommandBar slips to a far lower position and random left position. Problem 2: In some situations, my commandbar appears in Word! If someone klicks, this obviously triggers some bad errors. I really created only an Outlook AddIn and I ensure that Inspector.CurrentItem.Class is of type olMail before. How to prevent the appearance in Word! Redemption-Objects are available and used. Can someone please help? My customers complain about this behaviour and I'm running out of ideas to prevent :-( Kukulkan |
Ads |
#2
|
|||
|
|||
![]()
Hi,
I found a tip that suggested to write a Word AddIn to search for my custom CommandBar and removing it from the Word interface. I wrote such an addin, but it removes the buttom from Outlook Inspector, too! I'm going crazy. How to know if I'm in Word or in Outlook mail- inspector? Kukulkan |
#3
|
|||
|
|||
![]()
You do not need a separate Word addin. In your Outlook addin if you discover
that the window is using WordMail you instantiate a Word.Application object declared WithEvents. Then you handle the WindowActivate event. If the Envelope.Visible property is true on the window passed to you in WindowActivate then it's a WordMail window, if that property is false it's a Word document. Knowing that you can then hide or show your UI as appropriate. -- 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 wrote in message ... Hi, I found a tip that suggested to write a Word AddIn to search for my custom CommandBar and removing it from the Word interface. I wrote such an addin, but it removes the buttom from Outlook Inspector, too! I'm going crazy. How to know if I'm in Word or in Outlook mail- inspector? Kukulkan |
#4
|
|||
|
|||
![]()
Hi Ken,
You do not need a separate Word addin. In your Outlook addin if you discover that the window is using WordMail you instantiate a Word.Application object declared WithEvents. Then you handle the WindowActivate event. If the Envelope.Visible property is true on the window passed to you in WindowActivate then it's a WordMail window, if that property is false it's a Word document. Whow, this worked perfectly. Needed some additional work, because this does not work with OL2000, but managed to run. Thank you. Is there a solution for Problem 1, too? If I have Word as editor it seem to be impossible to reproduce the CommandBar position in a reliable way. Sometimes, another CommandBar, that have been in the same row before, is pushed down one row after inserting my own CommandBar. Other situations, the button has been placed on top of the "Send" CommandBar, and after restauration it is below the "Send" CommandBar. Any solution for this, too? Kukulkan |
#5
|
|||
|
|||
![]()
No solution for that problem that I've ever found. It can happen with the
Outlook editor also, you know. If an addin that gets initialized before yours claims that spot in the UI yours get placed somewhere else no matter what position settings you call for. Not much you can do about it. -- 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 wrote in message ... Hi Ken, You do not need a separate Word addin. In your Outlook addin if you discover that the window is using WordMail you instantiate a Word.Application object declared WithEvents. Then you handle the WindowActivate event. If the Envelope.Visible property is true on the window passed to you in WindowActivate then it's a WordMail window, if that property is false it's a Word document. Whow, this worked perfectly. Needed some additional work, because this does not work with OL2000, but managed to run. Thank you. Is there a solution for Problem 1, too? If I have Word as editor it seem to be impossible to reproduce the CommandBar position in a reliable way. Sometimes, another CommandBar, that have been in the same row before, is pushed down one row after inserting my own CommandBar. Other situations, the button has been placed on top of the "Send" CommandBar, and after restauration it is below the "Send" CommandBar. Any solution for this, too? Kukulkan |
#6
|
|||
|
|||
![]()
Thank you!
Kukulkan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use Insert Address button in Word with GroupWise | Angie M. | Outlook - Using Contacts | 3 | September 19th 08 01:26 AM |
button not firing when word is set as MailEditor. | Joe | Add-ins for Outlook | 1 | June 13th 07 03:19 PM |
Command buttons when using word as email button | [email protected] | Add-ins for Outlook | 1 | October 9th 06 09:27 PM |
Adding a button when using word to display rtf messages fails | james | Add-ins for Outlook | 4 | August 13th 06 06:42 PM |
word "message" appears on received email | IMAGEREP | Outlook Express | 4 | March 15th 06 02:18 AM |