View Single Post
  #7  
Old April 29th 09, 07:44 PM posted to microsoft.public.outlook.program_vba
Christopher Slowik
external usenet poster
 
Posts: 5
Default Custom Form and firing Revise Contents button

Same message Ken.....Invalid Procedure call or argument.

I'm stumped

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

Just for fun try it with this line instead:

objCB.ExecuteMso "ReviseContents"

Of course this will only run without error on Outlook 2007...

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Christopher Slowik" wrote in
message ...
Hi Ken,

No the MsgBox fires. Here is the changed code.

Dim objInsp
Dim objCB
'On Error Resume Next
Set objInsp = Item.GetInspector
Set objCB = objInsp.CommandBars
If Not objCB Is Nothing Then
MsgBox "Here we are with objCB"
objCB.ExecuteMso("ReviseContents")
End If

Set objInsp = Nothing
Set objCB = Nothing

the line "objCB.ExecuteMso("ReviseContents")" throws the following error:

Invalid procedure call or argument
Line No:11



Ads