paste Excel named range as text

User avatar
stuck
Panoramic Lounger
Posts: 8128
Joined: 25 Jan 2010, 09:09
Location: retirement

paste Excel named range as text

Post by stuck »

I'm getting better at this lark, the Lounge Magic kicked in before I clicked Submit this time...

I have a named range in an Excel workbook and I'm pasting it into Word. The named range is a single cell but it was pasting in as a single cell Word table when I wanted it to paste as text. As I typed out my question it dawned on me that the problem was I was just using:

Code: Select all

Selection.Paste
when I needed some sort of Paste Special. Once I realised that, a quick Google search told me the syntax I needed was:

Code: Select all

Selection.PasteSpecial DataType:=wdPasteText
:thumbup: that did the trick and the crowd went wild :thewave:

Thanks for listening.

Ken

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: paste Excel named range as text

Post by HansV »

:clapping:
Best wishes,
Hans

User avatar
StuartR
Administrator
Posts: 12577
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: paste Excel named range as text

Post by StuartR »

The magic of composing a lounge post :fanfare:
StuartR