A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

My Outlook button appears in Word!



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 29th 08, 11:00 AM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 8
Default My Outlook button appears in Word!

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  
Old September 29th 08, 01:44 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 8
Default My Outlook button appears in Word!

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  
Old September 29th 08, 02:04 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default My Outlook button appears in Word!

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  
Old September 30th 08, 11:02 AM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 8
Default My Outlook button appears in Word!

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  
Old September 30th 08, 02:14 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default My Outlook button appears in Word!

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  
Old October 1st 08, 03:25 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 8
Default My Outlook button appears in Word!

Thank you!

Kukulkan
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 08:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.