HOWTO: Get Reference to "SEND" Button in Outlook Inspector

S

StevenBr

As part of my add-in, I would like to alter the appearance of the default
SEND button in the active inspector window. Can this be done? My initial
survey of the commandbars collection doesn't seem to expose this commandbar
or button.

Thanks!
 
K

Ken Slovak - [MVP - Outlook]

Look in the Standard CommandBar (toolbar). You can trap that Click event.
You need to hide the original button and replace it with your own to do any
real customizations.
 
S

StevenBr

I see nothing in the Standard commandbar that looks like a Send button; what
I see is enumerated below. I see an awful lot of Word stuff, because I use
Word as my editor. But there is no commandbar button captioned Send in any
commandbar I can find.

What I want to do is simply change the appearance of the label (perhaps
bolden it) to indicate that my enhancements to the Send function are in
effect.

"CommandBar: Standard (Toolbar) (Built-in)"
" New &E-mail Message (Button)"
" &Open... (Button)"
" &Save (Button)"
" Permission (Unrestricted Access) (Button)"
" &Mail Recipient (Button)"
" &Print (Button)"
" Print Pre&view (Button)"
" &Spelling and Grammar... (Button)"
" &Research... (Button)"
" Cu&t (Button)"
" &Copy (Button)"
" &Paste (Button)"
" &Format Painter (Button)"
" &Undo (SplitDropdown)"
" &Redo (SplitDropdown)"
" Insert &Ink Annotations (SplitButtonPopup)"
" Hyperl&ink... (Button)"
" &Tables and Borders Toolbar (Button)"
" &Insert Table... (ExpandingGrid)"
" &Insert Excel Spreadsheet (ExpandingGrid)"
" MapPoint (Button)"
" &Columns... (ExpandingGrid)"
" &Drawing (Button)"
" &Document Map (Button)"
" &Show All (Button)"
" &Zoom: (Combobox)"
" Microsoft Office Word &Help (Button)"
" &Read (Button)"
--
Thanks for responding!

Steven Bras
Tessitura Network, Inc.


Ken Slovak - said:
Look in the Standard CommandBar (toolbar). You can trap that Click event.
You need to hide the original button and replace it with your own to do any
real customizations.
 
P

Peter Huang [MSFT]

Hi Steven,

We can use the approach to catch the instance of the Send Button
and then change its caption to another text.

But the OM did not provide an approach to bolded it.

Public WithEvents olApp As Application
Public WithEvents olInspectors As Inspectors
Private Sub Class_Initialize()
Set olApp = Application
Set olInspectors = olApp.Inspectors
End Sub


Private Sub olInspectors_NewInspector(ByVal Inspector As Inspector)
Dim o As CommandBarButton
Set o = Inspector.CommandBars("Standard").Controls(2)
o.Caption = "Changed Send"
End Sub

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

StevenBr

That doesn't work. The second control is described as "Opens an existing
document or template", which means it's the Word file/open function.

The problem seems to be that the Send button is inaccessible when using
WordMail. Is this the case?

Thanks!
 
S

StevenBr

There's a post above, in which Ken Slovak responded:

The solution is to check in your NewInspector event to see
if wordmail is the editor. If so you need to instantiate a word doc from the
inspector item. Then in the word doc, use the windowactivate to add buttons
if Envelope.visible is true. If Envelope.visible is false then delete the
buttons.

Is this possibly the answer to my problem as well? Is it possible that the
Send button is actually in the Word doc object?
 
P

Peter Huang [MSFT]

Hi Steven,

Here is a KB for your reference.

Considerations When You Use Microsoft Word as the E-Mail Editor
When you are designing an Outlook CommandBar solution for mail items, it is
important that you understand that different CommandBars are used when
Microsoft Word is set as the e-mail editor. Some key points that you must
consider when you use Word as the e-mail editor are:
- CommandBars are part of Word, not Outlook.
- Different CommandBars are available based on the message editor and
format.
- Custom buttons may disappear when you change message editor or format.
- The special Envelope CommandBar is not designed to be customized.
- There is no Inspector object for the HTML and Plain Text formats with
Office 2000 if Word is set as the e-mail editor.

201095 OL: How to Use CommandBars in Outlook Solutions
http://support.microsoft.com/?id=201095


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top