开发者

Hide the built-in Send button in Outlook 2003

开发者 https://www.devze.com 2022-12-18 18:26 出处:网络
I am using ms-outlook 2003, i want to hide the built-in send button and use the custom button to send the mail.

I am using ms-outlook 2003, i want to hide the built-in send button and use the custom button to send the mail.

As i have worked on C,C++ and on Java, dont know how to work on VB/VBScript/VBA, can any body tell me how to hide this button and also how to send mail from custom button, how to access the fields of开发者_StackOverflow社区 mail (ie., the TO field, Subject field, Msg Body, attachment etc).


If you want to do this you have to get a reference to the button via its ID. Then you can control it properties such as enable / disable it.

VB

Set oCommandBars = Item.GetInspector.CommandBars
Set oStandardBar = oCommandBars("Standard")

Counter = 1

For Counter = 1 To oStandardBar.Controls.Count
    If oStandardBar.Controls(Counter).ID = "1975" Then
        oStandardBar.Controls(Counter).Enabled = False
        Exit For
    End If
Next

But as Lazarus say's there are many ways to skin a cat so may be a little more explanation would help, are you doing this in and Addin or via Automation etc?

0

精彩评论

暂无评论...
验证码 换一张
取 消