Thread: Macro problem
View Single Post
 
Old 08-10-2014, 12:01 PM
niton niton is offline Windows 7 64bit Office 2010 64bit
Competent Performer
 
Join Date: Jul 2012
Posts: 102
niton is on a distinguished road
Default

The code in Outlook looks more like this. Untested.

Code:
Option Explicit

Public Sub PasteUnformatted()

Dim oDoc As Object
Dim itm As Object
Dim objSel As Word.Selection

On error resume next
Set itm = Application.ActiveInspector.CurrentItem
on error goto 0

if itm is nothing then
    msgbox "Something wrong with current item"
    exit sub
end if

If itm.GetInspector.EditorType = olEditorWord Then
    Set oDoc = itm.GetInspector.WordEditor
    Set objSel = objDoc.Windows(1).Selection
    objSel.PasteSpecial Link:=False, DataType:=wdPasteText
End If

End Sub
No shortcuts except Alt+number shortcuts.
Reply With Quote