Copy user fields to clipboard

J

Jan Kuijt

I have designed a user mail form with 3 custom fields. I want the Recipient
to be able to copy the content of this fields to the clipboard so that it
can be used as text in Word.
I have made a command button but I don't know te code to activate the
button.

Please help.

Jan Kuijt
 
E

Eric Legault [MVP - Outlook]

If you just want to know how to execute an available button, just use code
like below to call it by its unique ID:

Sub CommandButton1_Click()
Dim objCBC
set objCBC= Application.ActiveInspector.Commandbars.FindControl(,19)
'executes Copy button
objCBC.Execute
End Sub
 
Top