chesnuttjh
Technical User
I need some help in VBA programming in Outlook2K.
I am running Outlook2K with Office2K. I have a mailitem open with the cursor in the message body. At the cursor point, I want to paste from the clipboard formatted text copied from a Word2K document.
I want to do the pasting by executing from the menu bar Edit-PasteSpecial-PasteAs-Formatted Text (RTF) - OK entirely in VBA without using Sendkeys.
I have prepared a macro that has the following VBA code that works to the point of executing Edit-PasteSpecial-PasteAs- and opening up the dialog box that will let me select Formatted Text (RTF) and then press OK, but I have been unable to determine the VBA code that will actually select Formatted Text (RTF) and then press OK to complete the paste.
Dim objOLApp As Outlook.Application
Dim objNS As NameSpace
Dim ctlCBarControl As CommandBarControl
Set objOLApp = New Outlook.Application
Set objNS = objOLApp.GetNamespace("MAPI"
Set ctlCBarControl = Application.ActiveInspector _
.CommandBars("Menu Bar".Controls("Edit" _
.Controls("Paste Special..."
ctlCBarControl.Execute
Please let me know the additional VBA code that I need to actually select Formatted Text (RTF) and then press OK to complete the paste, without using Sendkeys.
Thanks in advance.
I am running Outlook2K with Office2K. I have a mailitem open with the cursor in the message body. At the cursor point, I want to paste from the clipboard formatted text copied from a Word2K document.
I want to do the pasting by executing from the menu bar Edit-PasteSpecial-PasteAs-Formatted Text (RTF) - OK entirely in VBA without using Sendkeys.
I have prepared a macro that has the following VBA code that works to the point of executing Edit-PasteSpecial-PasteAs- and opening up the dialog box that will let me select Formatted Text (RTF) and then press OK, but I have been unable to determine the VBA code that will actually select Formatted Text (RTF) and then press OK to complete the paste.
Dim objOLApp As Outlook.Application
Dim objNS As NameSpace
Dim ctlCBarControl As CommandBarControl
Set objOLApp = New Outlook.Application
Set objNS = objOLApp.GetNamespace("MAPI"
Set ctlCBarControl = Application.ActiveInspector _
.CommandBars("Menu Bar".Controls("Edit" _
.Controls("Paste Special..."
ctlCBarControl.Execute
Please let me know the additional VBA code that I need to actually select Formatted Text (RTF) and then press OK to complete the paste, without using Sendkeys.
Thanks in advance.