macro for PasteSpecial Unformatted

Discussion in 'Word VBA' started by Beth Mc, Jun 20, 2005.

  1. Beth Mc

    Beth Mc Guest

    I've tried to create a macro for paste-special -- unformatted. I used the
    "record new macro" option, but this is what my macro looks like. What do I
    need to put instead of "(wdPasteDefault)"?

    Sub UnformattedPaste()
    '
    ' UnformattedPaste Macro
    '
    Selection.PasteAndFormat (wdPasteDefault)
    End Sub
     
    Beth Mc, Jun 20, 2005
    #1
    1. Advertisements

  2. Beth Mc

    Anne Troy Guest

    Anne Troy, Jun 20, 2005
    #2
    1. Advertisements

  3. Beth Mc

    Jay Freedman Guest

    This is one of several situations where the recorder gets it completely
    wrong. It isn't just the wdPasteDefault that's wrong, but PasteAndFormat is
    the wrong method. Replace the whole line with this:

    Selection.PasteSpecial DataType:=wdPasteText
     
    Jay Freedman, Jun 20, 2005
    #3
  4. Beth Mc

    Beth Mc Guest

    Beth Mc, Jun 20, 2005
    #4
  5. Beth Mc

    Anne Troy Guest

    LOL, Beth. That's the exact one I pointed you to. :)

    *******************
    ~Anne Troy

    www.OfficeArticles.com
    www.MyExpertsOnline.com


     
    Anne Troy, Jun 20, 2005
    #5
  6. Beth Mc

    kafkaroo

    Joined:
    Sep 12, 2013
    Messages:
    1
    Likes Received:
    0
    This is only eight years old and I just did something that worked. Instead of [Selection.PasteAndFormat (wdPasteDefault)], try [Selection.PasteAndFormat (wdFormatPlainText)].
     
    kafkaroo, Sep 12, 2013
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.