November 2007 Archives
Note: Unlike Word 2007, you can't assign a Keyboard shortcut to macros in Outlook. You can however add the macro to the Quick Access toolbar. You can then press the ALT key and use the number assigned to the macro.
1. From the Tools menu choose Macro and then select click Macros.
2. Enter PlainPaste as the Macro name.
3. Click Create.
4. Place the cursor at the START OF THE LINE ABOVE 'END SUB' and enter this text:
Dim objDoc As Word.Document
Dim objSel As Word.Selection
On Error Resume Next
Set objDoc = Application.ActiveInspector.WordEditor
Set objSel = objDoc.Windows(1).Selection
objSel.PasteSpecial Link:=False, DataType:=wdPasteText
Set objDoc = Nothing
Set objSel = Nothing
NOTE: The above will not work unless you add the Microsoft Word 12.0 Object Library to your project. More details here on linkage between Outlook's VBA and Word VBA.
http://turtleflock-ol2007.spaces.live.com/blog/cns!C1013F1F9A99E3D8!579.entry
5. KEY STEP: From the Tools menu choose Reference. Scroll down in the list to Microsoft Word 12.0 Object Library. Place a check in the box beside its name.
6. From the File menu choose Close and Return to Microsoft Office Outlook.
7. Open a new message.
8. Click the Customize Quick Access Toolbar button and choose More Commands.
10. In the Categories list, scroll down and select Macros. On the left side, highlight Project1.Plaintext.
11. Click Add to move it to the right side.
12. The position in the Quick Access list determines the keyboard command with the ALT key. You the Up or Down arrows as needed to position the command.
13. You should also pick a new icon for the macro. Click Modify. Choose an new symbol to suit your needs. You can also edit the Display name if needed. Click OK. Click OK.
14. To test the Macro, copy text with Formatting. Click the button on the Quick Access toolbar or press the ALT +
1. From the View tab click Macros.
2. Enter PlainPaste as the Macro name.
3. In the Macros drop-down menu select Normal.dotm.
4. Click Create.
5. Place the cursor at the START OF THE LINE ABOVE 'END SUB' and enter this text:
Selection.PasteSpecial Link:=False, DataType:=wdPasteText
6. From the File menu choose Close and Return to Microsoft Word.
7. To test the Macro, copy text with Formatting. Then, from the View tab click Macros. Double click on the PlainPaste macro to run it. You should have the text only.
Note: You can now assign a new shortcut key or replace the regular Ctrl - V command to use this plain paste option.
8. From the Office Button choose Word Options. Click Customize.
9. At the bottom, click the Customize button beside Keyboard shortcuts.
10. In the Categories list, scroll down and select Macros. On the right side, highlight Normal.NewMacros.Plaintext.
11. Click in the Press new shortcut key box.
12. Press the key combination you want to use for the PlainPaste macro.
13. Click Assign. Click Close. Click OK.