Replace "Send" button with custom one

  • Thread starter Thread starter Cool Sport
  • Start date Start date
C

Cool Sport

Hi everyone,

I am creating an application that manipulate the New Message Window in
Outlook 2003. I can embed my form into that window.

I would like to remove the Send button and add a new one in named
Send/Preview (that will run my code).

I have tried to turn off the toolbar that the Send button is on but no
success.

Can anyone please tell me the solution?
 
Examine the code snippet below.

Dim objCB As Office.CommandBar, objCBB As Office.CommandBarButton,
objInsp As Outlook.Inspector

Set objInsp = ActiveInspector

If objInsp Is Nothing Then Exit Sub

Set objCB = objInsp.CommandBars("Standard")
'objCB.Visible = False 'Hides the entire Standard Toolbar
Set objCBB = objCB.FindControl(, 2617) 'Get the Send button from the
Standard toolbar
objCBB.Visible = False 'Hide the Send button
'objCBB.Delete(True) 'Temporarily delete the Send button for the current
session only
Set objCB = Nothing
Set objCBB = Nothing
Set objInsp = Nothing
 
I appreciate your reply but your code did not get me through this
problem. It could not find the Send button control whose ID is 2617.

Or I have not done these steps properly???

When I click on New Message... button in Outlook, it opens up a new
message window. I meant the Send button in that new window. The toolbar,
which the Send button is on, could not be turned on or off.

Any ideas?

Regards,
 
I have found out that your code does what it should do only in the
Microsoft Office Outlook (HTML) editor (menu Actions -> New Mail Message
Using -> Microsoft Office Outlook (HTML)).

If I just click on the New button to create a new message, it will use
Microsoft Word (which is much nicer) as default editor. Is there a way
to control the Send button on that window.
 
It looks like you're out of luck - that toolbar is the only one that is not
exposed for automation in the WordMail editor.
 
Back
Top