PC Review


Reply
Thread Tools Rate Thread

Cannot get tool/menubars in Office 2000 when using WordMail as edi

 
 
=?Utf-8?B?Q2hyaXMgTGFuZ2ZvcmQ=?=
Guest
Posts: n/a
 
      24th Oct 2007
Sorry if this is the wrong forum - it's not a VBA/Forms question and there
isn't a Outlook VB group. So here goes....

I am having problems with a VB6 Outlook AddIn that needs to add a new
ToolBar and MenuBar to all Inspector windows. Using the advice in this, and
other, forums I have got the AddIn working with mutliple Explorer/Inspector
windows when using the OutLook editor but am having problems with Word as an
email editor.

Environment: WinXP, Office2000, VB6SP6

VB6 code developed
- Using Explorer/Inspector wrappers; trapping New/Activate events
- Generating unique names for Tool/Menubars + ControlButtons
- Watching for the Word WindowActivate event

As I said above, it all works OK when using OutLook as mail editor and
everything works in Office 2003/7 as well.

Issues:
1) MenuBar item not added first time Word Inspector is invoked
- "Method '~' Of Object '~' failed" when reference CommandBars collection
I am trying to add a new item to the Help menu and to the Standard
toolbar in the Activate event. The Toolbar add works (but see next item)
but menu gives the error above. If you close the Inspector window and
re-open and Help item is there.
Both adds work first time in Office 2003.

2) Cannot make the "Standard" ToolBar visible
- Setting the Visible property does not cause toolbar to be displayed
The "Standard" toolbar is not visible when inspector is displayed even
though I set it to Visible - The user has to manually make it visible.
Again this works in Office 2003.

3) Multiple MenuBars if open than one Explorer window
If you open more than one explorer window you get multiple menubars
for your addin in Office 2000 (and it crashes when you exit).
This appears to have been fixed in SR1.

4) "New" button does not create an inspector (but uses one if loaded)
This is a documented issue. Although if you have an inspector window
open then it gets a WindowActivate event.
Is there any way to trap the "New" button in Office2000 or do you have
to write a Word AddIn?

5) Can you determine (using object model) is WordMail is on?
You can do this once a mail item is open but it would be nice to inform the
user
when the AddIn is loaded if WordMail is going to cause problems.

Issues 4 is probably the "show stopper" since if I can't add the toolbars
our AddIn will not do anything. Issues 1 and 2 could be handled by user
training (but not ideal).

I also have some questions (about thing mentions elsewhere in the forum)
that may be related to the problem:

1) Weak reference to Inspector in "New" event
One of the answers suggested that the Inspector reference in the New event
was a "weak" reference (CommandBars not created yet). Is this the actual
reference, but the CommandBar is not created, and so it is safe to cache this
reference for later use or should I capture the ActiveInspector reference in
the Activate event.

2) Which CommandBars to use; Inspector, WordEditor, WordEditor.Application
When using WordMail as the editor should you add toolbars to the CommandBars
collection of Inspector, the document object (Inspector.WordEditor), or
the Word application (Inspector.WordEditor.Application)?
I am using Inspector.WordEditor.Application.

3) What Tool/MenuBars can you use in Word
I read on another forum that you could only modify the "Menu Bar" and the
"Standard" ToolBar. Should I only modify the "Standard" ToolBar?
I seem to be able to create new toolbars and menus but then next time I
start Word it crashes! (Is this a hint to only use standard items?)

4) Not using unique names for Word objects
I notice in the sample code that it uses the same name for the controls
in Word Tool/Menu bars (rather than unique names). Is this because
one instance of Word is serving all of the documents?

Any assistance would be appreciated,

Chris
 
Reply With Quote
 
 
 
 
Michael Bauer [MVP - Outlook]
Guest
Posts: n/a
 
      25th Oct 2007


Chris, *.program_vba would have been a better place as this group isn't for
programming issues.

- In Outlook 2000 you don't get the NewInspector event for WordMail. A
workaround might be to use a timer and check at intervals for new objects.

- In Office 2000 the Commandbars are very buggy. I recommend not to to
modify the existing toolbars, but create a toolbar of your own. And create
every object only temporarily, else you won't get rid of it anymore.

- With WordMail use the Inspector_Activate event for creating your
commandbars because the Newinspector event it's too early.

- You can check the registry for whether WordMail is being used or not. In
OL03 it's in:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Options\Mail\EditorPreference

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Organize eMails:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Wed, 24 Oct 2007 14:26:04 -0700 schrieb Chris Langford:

> Sorry if this is the wrong forum - it's not a VBA/Forms question and there
> isn't a Outlook VB group. So here goes....
>
> I am having problems with a VB6 Outlook AddIn that needs to add a new
> ToolBar and MenuBar to all Inspector windows. Using the advice in this,

and
> other, forums I have got the AddIn working with mutliple

Explorer/Inspector
> windows when using the OutLook editor but am having problems with Word as

an
> email editor.
>
> Environment: WinXP, Office2000, VB6SP6
>
> VB6 code developed
> - Using Explorer/Inspector wrappers; trapping New/Activate events
> - Generating unique names for Tool/Menubars + ControlButtons
> - Watching for the Word WindowActivate event
>
> As I said above, it all works OK when using OutLook as mail editor and
> everything works in Office 2003/7 as well.
>
> Issues:
> 1) MenuBar item not added first time Word Inspector is invoked
> - "Method '~' Of Object '~' failed" when reference CommandBars collection
> I am trying to add a new item to the Help menu and to the Standard
> toolbar in the Activate event. The Toolbar add works (but see next item)
> but menu gives the error above. If you close the Inspector window and
> re-open and Help item is there.
> Both adds work first time in Office 2003.
>
> 2) Cannot make the "Standard" ToolBar visible
> - Setting the Visible property does not cause toolbar to be displayed
> The "Standard" toolbar is not visible when inspector is displayed even
> though I set it to Visible - The user has to manually make it visible.
> Again this works in Office 2003.
>
> 3) Multiple MenuBars if open than one Explorer window
> If you open more than one explorer window you get multiple menubars
> for your addin in Office 2000 (and it crashes when you exit).
> This appears to have been fixed in SR1.
>
> 4) "New" button does not create an inspector (but uses one if loaded)
> This is a documented issue. Although if you have an inspector window
> open then it gets a WindowActivate event.
> Is there any way to trap the "New" button in Office2000 or do you have
> to write a Word AddIn?
>
> 5) Can you determine (using object model) is WordMail is on?
> You can do this once a mail item is open but it would be nice to inform

the
> user
> when the AddIn is loaded if WordMail is going to cause problems.
>
> Issues 4 is probably the "show stopper" since if I can't add the toolbars
> our AddIn will not do anything. Issues 1 and 2 could be handled by user
> training (but not ideal).
>
> I also have some questions (about thing mentions elsewhere in the forum)
> that may be related to the problem:
>
> 1) Weak reference to Inspector in "New" event
> One of the answers suggested that the Inspector reference in the New event
> was a "weak" reference (CommandBars not created yet). Is this the actual
> reference, but the CommandBar is not created, and so it is safe to cache

this
> reference for later use or should I capture the ActiveInspector reference

in
> the Activate event.
>
> 2) Which CommandBars to use; Inspector, WordEditor, WordEditor.Application
> When using WordMail as the editor should you add toolbars to the

CommandBars
> collection of Inspector, the document object (Inspector.WordEditor), or
> the Word application (Inspector.WordEditor.Application)?
> I am using Inspector.WordEditor.Application.
>
> 3) What Tool/MenuBars can you use in Word
> I read on another forum that you could only modify the "Menu Bar" and the
> "Standard" ToolBar. Should I only modify the "Standard" ToolBar?
> I seem to be able to create new toolbars and menus but then next time I
> start Word it crashes! (Is this a hint to only use standard items?)
>
> 4) Not using unique names for Word objects
> I notice in the sample code that it uses the same name for the controls
> in Word Tool/Menu bars (rather than unique names). Is this because
> one instance of Word is serving all of the documents?
>
> Any assistance would be appreciated,
>
> Chris

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use WordMail Editor? ... with .Net 2.0 & Office 2003 (Word/ Outlook) ... in a c# application Gordian Microsoft Outlook Interoperability 1 14th Jun 2005 04:00 PM
Portuguese Spelling Tool for Office 2000 =?Utf-8?B?V29sZmdhbmc=?= Microsoft Word Document Management 1 1st Dec 2004 02:51 PM
Wordmail in Outlook 2000 Sam Microsoft Outlook 3 7th Apr 2004 03:13 AM
Tool/Menubars depending on login name OzPete Microsoft Access Form Coding 1 12th Dec 2003 02:36 PM
Unable to use export/import tool in office 2000 O. N. Microsoft Outlook Discussion 1 10th Jul 2003 09:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:46 AM.