View Single Post
  #1  
Old October 25th 06, 12:05 AM posted to microsoft.public.outlook.program_vba
JimRBG
external usenet poster
 
Posts: 9
Default Postitem - revise content

Thanks Ken,

Here is what I came up with.

Sub myRevisePost()
Dim olApp As Outlook.Application
Dim objPost As Outlook.PostItem
Dim olExp As Outlook.Explorer
Dim olSel As Outlook.Selection
' Get the current Folder
Set olApp = Outlook.Application
Set olExp = olApp.ActiveExplorer
Set olSel = olExp.Selection
Set objPost = olExp.Selection.Item(1)
objPost.Display
objPost.GetInspector.CommandBars.Item("Edit").Cont rols("Revise
Contents").Execute
End Sub


"Ken Slovak - [MVP - Outlook]" wrote:

You'd have to get the ID of the menu item you want and get it as a
CommandBarControl or CommandBarButton object and then call its Execute
method. That's about the only way.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"JimRBG" wrote in message
...
I have the following code:

Set olApp = Outlook.Application
Set onsMapi = olApp.GetNamespace("MAPI")
Set ofldrSrc = olApp.ActiveExplorer.CurrentFolder
Set OlExp = olApp.ActiveExplorer
Set OlSel = OlExp.Selection
Set objPost = OlExp.Selection.Item(1)
objPost.Display

This dispalys an existing post item. I need to be able to revise this
post,
so I choose EDIT, Revise Contents; and the post is changed to editable
version that I can modify. I wold like the code to automatically open the
post item in 'revise contents' mode. Is there a way to do this
programatically?

Thanks,

Jim



Ads