Dear Outlook / VBA experts,
I am using the following code (googled it) to paste un-formatted text to email message. How can I change it, so the text pasted is bold, underlined and in quotes? Here is an instance for example in the next line. The text - antelope was darker - is pasted, once pasted it is bold, underlined and in quotes. How can this be achieved?
The "antelope was darker", leaner and more thoroughly cooked.
Private Sub Paste_Special_Unformatted()
Dim objDoc As Word.Document
Dim objSel As Word.Selection
On Error Resume Next
' get a Word.Selection from the open Outlook item
Set objDoc = Application.ActiveInspector.WordEditor
Set objSel = objDoc.Windows(1).Selection
' now do what you want with the Selection
objSel.PasteSpecial Link:=False, DataType:=wdPasteText
Set objDoc = Nothing
Set objSel = Nothing
End Sub
I am using the following code (googled it) to paste un-formatted text to email message. How can I change it, so the text pasted is bold, underlined and in quotes? Here is an instance for example in the next line. The text - antelope was darker - is pasted, once pasted it is bold, underlined and in quotes. How can this be achieved?
The "antelope was darker", leaner and more thoroughly cooked.
Private Sub Paste_Special_Unformatted()
Dim objDoc As Word.Document
Dim objSel As Word.Selection
On Error Resume Next
' get a Word.Selection from the open Outlook item
Set objDoc = Application.ActiveInspector.WordEditor
Set objSel = objDoc.Windows(1).Selection
' now do what you want with the Selection
objSel.PasteSpecial Link:=False, DataType:=wdPasteText
Set objDoc = Nothing
Set objSel = Nothing
End Sub