Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word: Paste Special | Unformated text 1

Status
Not open for further replies.

mintjulep

Technical User
Aug 20, 2004
1,551
JP
Is there any "native" way to add a toolbar button to accomplish

Edit | Paste Special... | Unformatted Text

in a single click?

I can see how to customize the toolbar to get as far as

Edit | Paste Special...

Am I going to have to assign a snip of VBA to a button?
 
Am I going to have to assign a snip of VBA to a button?"

I think so, but would be happy to hear something different.
Code:
Sub EditPasteSpecial()
'Overrides the Edit Paste Special command
  Selection.PasteSpecial Link:=False, _
      DataType:=[b]wdPasteText[/b], _
      Placement:=wdInLine, DisplayAsIcon:=False
End Sub

faq219-2884

Gerry
My paintings and sculpture
 
Don't know that I want to necessarily "override" it, as I "occasionally" need one of the other options.

Works fine as a sub assigned to a button though, thanks for pointing the way.
 
Umm, right, of course. Silly me, I should have posted it that way. Use the instructions within a Sub named something else, and assigned that to a button. If you use Sub EditPasteSpecial...then...that is what fires with EditPasteSpecial. At least for the document/template that holds that Sub.

Sub EditPasteSpecial() in the ThisDocument module of file yaddayadda.doc will only override in that document.

faq219-2884

Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top