Up front: I am -not- an expert on macros/VBA, or, better said, I have no knowledge of it at all.
I want to paste clipboard text as unformatted, plain text. Regretfully the VBA code from a recorded macro that I use in Excel
could not be used.
Found an old thread (Outlook 2007 Macro: Paste - Paste Special - Unformatted Text aug.22, 2009) dealing with this issue.
Macro reading:
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
This works fine.
Q: Is it possible to assign a hotkey to this?
(like ctrl-g, or ctrl-t)
I want to paste clipboard text as unformatted, plain text. Regretfully the VBA code from a recorded macro that I use in Excel
could not be used.
Found an old thread (Outlook 2007 Macro: Paste - Paste Special - Unformatted Text aug.22, 2009) dealing with this issue.
Macro reading:
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
This works fine.
Q: Is it possible to assign a hotkey to this?
(like ctrl-g, or ctrl-t)