"Other Actions" -> "Resend This Message ..." per VBA?

  • Thread starter Michael Freitter
  • Start date
M

Michael Freitter

Hello!

I need the vba code on a MailItem that make on a existing mail:
"Other Actions" -> "Resend This Message ..."

Thank you very much!
Michael
 
M

Michael Bauer [MVP - Outlook]

That should work by calling the commandbar button's Execute method. It's id
is 3165.

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Wed, 7 Oct 2009 14:31:02 -0700 schrieb Michael Freitter:
 
M

Michael Freitter

Hello,

thank you for the information, bur I am not a vba expert.

My code is:
-------------------------------------------------------------------
Sub eMailErneutÖffnen()

Dim AusgewähltesMail As MailItem

Set AusgewähltesMail = Application.ActiveExplorer.Selection.Item(1)
AusgewähltesMail.Display

End Sub
-------------------------------------------------------------------

How look the statement, that use the CommandBar button (or the
IRobbonControl) with the ID 3165?

Thank you!
Michael
 
M

Michael Freitter

Hello,

thank you very much! It's works fine!

I have now one additional question:

Wherefrom got I the numbers of the controls?
e.g. 3165 in "objInsp.CommandBars.FindControl(, 3165)"

Exist a list with all numbers to the controls?

Regads
Michael
 
S

Sue Mosher [MVP]

Unfortunately, that KB article doesn't come with instructions on how to
adapt the Excel technique to Outlook, which has two different types of
windows, Explorer and Inspector. For Outlook, there's a VBA sample at
http://www.outlookcode.com/codedetail.aspx?id=1507 to get the IDs . Or use
the Outlook Spy tool from http://www.dimastr.com/outspy/.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


Check out http://support.microsoft.com/kb/201095#12

--JP
 
J

JP

You're right, and the code isn't very efficient, but it does list the
FindControl IDs for both Inspector and Explorer objects.

--JP
 

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