Programmatic plain-text insert

B

BrianWren

I would like to create a macro, and put it on a toolbar button, that invoked
the behavior of Edit>Paste Special...>plain text.

How do I insert in an email that is open?

Can macros be assigned to buttons on a toolbar?
 
E

Eric Legault [MVP - Outlook]

You can only go so far to automate selecting the Paste Special menu item.
You can execute it as below, but you cannot control what happens with the
subsequent dialog that provides the paste options.

Dim objCBs As CommandBars
Dim objCBC As CommandBarControl
Dim objCB As CommandBar


Set objCBs = Application.ActiveInspector.CommandBars
Set objCB = objCBs("Menu Bar")
Set objCBC = objCB.FindControl(, 30003) 'Edit menu

For Each objCBC In objCBC.Controls
If objCBC.ID = 755 Then 'Paste Special
objCBC.Execute
Exit Sub
End If
Next
 
C

Cerveja

Awesome. Thanks Eric. I have been hitting "ALT + E + S" to trigger Paste
special as with Word and it sends my incomplete email. Thanks.
 

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