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

    --
    Thanks,
    Beth
     
    Beth Mc, Jun 20, 2005
    #1
    1. Advertisements

  2. Beth Mc

    Anne Troy Guest

    Try this, Beth:
    http://www.vbaexpress.com/kb/getarticle.php?kb_id=18

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

    www.OfficeArticles.com
    www.MyExpertsOnline.com


    "Beth Mc" <.(donotspam)> wrote in message
    news:D...
    > 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
    >
    > --
    > Thanks,
    > Beth
     
    Anne Troy, Jun 20, 2005
    #2
    1. Advertisements

  3. Beth Mc

    Jay Freedman Guest

    Beth Mc wrote:
    > 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


    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

    --
    Regards,
    Jay Freedman
    Microsoft Word MVP
     
    Jay Freedman, Jun 20, 2005
    #3
  4. Beth Mc

    Beth Mc Guest

    Anne:
    Thanks! I just found that one, but it didn't work for me. I'm not sure why?
    BUT I did find this other one and it works perfectly!!

    Sub PasteUnformatted()
    '
    Selection.PasteSpecial Link:=False, DataType:=wdPasteText

    End Sub

    from http://www.latext.com/pm/comments/P1107_0_1_0

    Thanks! Have a great day!
    Beth

    "Anne Troy" wrote:

    > Try this, Beth:
    > http://www.vbaexpress.com/kb/getarticle.php?kb_id=18
    >
    > *******************
    > ~Anne Troy
    >
    > www.OfficeArticles.com
    > www.MyExpertsOnline.com
    >
    >
    > "Beth Mc" <.(donotspam)> wrote in message
    > news:D...
    > > 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
    > >
    > > --
    > > Thanks,
    > > Beth

    >
    >
    >
     
    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


    "Beth Mc" <.(donotspam)> wrote in message
    news:D...
    > Anne:
    > Thanks! I just found that one, but it didn't work for me. I'm not sure

    why?
    > BUT I did find this other one and it works perfectly!!
    >
    > Sub PasteUnformatted()
    > '
    > Selection.PasteSpecial Link:=False, DataType:=wdPasteText
    >
    > End Sub
    >
    > from http://www.latext.com/pm/comments/P1107_0_1_0
    >
    > Thanks! Have a great day!
    > Beth
    >
    > "Anne Troy" wrote:
    >
    > > Try this, Beth:
    > > http://www.vbaexpress.com/kb/getarticle.php?kb_id=18
    > >
    > > *******************
    > > ~Anne Troy
    > >
    > > www.OfficeArticles.com
    > > www.MyExpertsOnline.com
    > >
    > >
    > > "Beth Mc" <.(donotspam)> wrote in message
    > > news:D...
    > > > 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
    > > >
    > > > --
    > > > Thanks,
    > > > Beth

    > >
    > >
    > >
     
    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

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.
Similar Threads
  1. Replies:
    2
    Views:
    483
  2. groovesmith

    Paste Unformatted Text macro

    groovesmith, Nov 28, 2006, in forum: Word VBA
    Replies:
    3
    Views:
    193
    groovesmith
    Nov 28, 2006
  3. Macro''''er

    Paste unformatted text with red text

    Macro''''er, May 14, 2007, in forum: Word VBA
    Replies:
    2
    Views:
    193
    Doug Robbins - Word MVP
    May 15, 2007
  4. Alan
    Replies:
    1
    Views:
    155
    Graham Mayor
    Sep 6, 2007
  5. raphiel2063
    Replies:
    4
    Views:
    374
    raphiel2063
    Sep 19, 2007
  6. Jim In Minneapolis

    "Paste Special - Unformatted Text" Macro

    Jim In Minneapolis, Nov 25, 2007, in forum: Word VBA
    Replies:
    3
    Views:
    183
    Graham Mayor
    Nov 25, 2007
  7. HSBCwilliam

    About the unformatted paste

    HSBCwilliam, Feb 15, 2008, in forum: Word VBA
    Replies:
    2
    Views:
    169
    HSBCwilliam
    Feb 18, 2008
  8. Sandi V
    Replies:
    4
    Views:
    234
Loading...