Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    mountains, North Carolina, USA
    Posts
    64
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Paste Special Tool Bar Button

    I find myself putting together presentations using materials from various sources. Have found that it saves tons of work to let the pasted text adopt the formatting that already exists for the slides in my presentation.

    I can easily do this using the Paste Special button I put on my toolbar. But, even using that button I still have to choose "unformatted text" from a dialog box that pops up.

    How do I create a toolbar button (or keyboard short cut) that allows me to paste special unformatted text with one click?

    At various times I use Office 2003 and or Office 2007.

    Larry P

  2. #2
    3 Star Lounger
    Join Date
    Feb 2007
    Location
    Durham, Durham, United Kingdom
    Posts
    286
    Thanks
    0
    Thanked 10 Times in 10 Posts
    Hi Larry

    There's no discrete 'Paste Special as Unformatted Text' command as such in any version so it cannot be added to the ribbon or Toolbar. You would have to get someone to write code to do this and then further code to make a ribbon / toolbar entry.

  3. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Larry,

    I've played around with this for the last hour and can't find a way to code it. You would need an "ActiveShape" object and I can't find anything in the object model that suports it. I even tried reverting to PP2003 which still had a macro recorder but it did not record the PasteSpecial action!

    I did however manage to do this for Excel, actually I tried this first since I'm familiar with the Excel Object Model.
    Code:
    Sub PSUnFmt()
        
        ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:=False
        
    End Sub
    I placed the macro in my Personal.xls file and then added the macro to the QAT. Works like a charm. Would probably work in Word also.

    Sorry I can't make it work in PP.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  4. #4
    3 Star Lounger
    Join Date
    Feb 2007
    Location
    Durham, Durham, United Kingdom
    Posts
    286
    Thanks
    0
    Thanked 10 Times in 10 Posts
    The macro in PPt would be:
    Code:
    ActiveWindow.View.PasteSpecial DataType:=ppPasteText
    Thats not the problem. In PowerPoint, unlike Excel you cannot attach macros to the QAT (or anywhere else) and have them work reliably. You need to code as an AddIn with code that creates a ribbon or toolbar entry. That's not so simple. In 2007 on you really need to use XML and in 2003 fairly complex vba.

  5. #5
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    John,

    Thanks, I played around but didn't get that object/method path. I had found the ppPasteText part though. I just tried it in 2010 and it works just fine attached to the QAT of course it is in that Presentation and as you say would need to be coded in an Add-in or maybe a master template to always be available. Thanks again.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  6. #6
    3 Star Lounger
    Join Date
    Feb 2007
    Location
    Durham, Durham, United Kingdom
    Posts
    286
    Thanks
    0
    Thanked 10 Times in 10 Posts
    Just note though that adding to the master template doesn't actually work (Why Microsoft?). It has to be an AddIn to work reliably and then you need to know how to write the XML to add a ribbon button!

    There's a BASIC lesson on our site.
    http://www.pptalchemy.co.uk/custom_UI.html

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •