Office Clipboard Format

G

George Lee

I am copying a range from Excel and pasting it into a Word document. The
problem is that sometimes it pastes the clipboard item as a table (the format
I want it in) but other times in a tab delinated format. Is there a reason
for this? How do I force it to paste as a table?
 
J

Jean-Guy Marcil

George Lee was telling us:
George Lee nous racontait que :
I am copying a range from Excel and pasting it into a Word document.
The problem is that sometimes it pastes the clipboard item as a table
(the format I want it in) but other times in a tab delinated format.
Is there a reason for this? How do I force it to paste as a table?

Use .PasteSpecial instead of .Paste.

Look up PasteSpecial in the VBA help to see all of the available formats.

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
G

George Lee

Thanks. I tried all of those previously.
The symptoms here is here that I'm trying to join two similar tables. In
identical runs, one allows me (and even displays the Paste As Joined Table in
the Edit menu), in other cases, it won't (displaying simply Paste in the Edit
menu). The only thing I can see different is in the Office Clipboard pane
when there ran the application without explicitly clearing the clipboard, is
that there are two clipboard items, one always pastes as a table, the other
as tabbed. It won't work programmatically.
It's either a bug (possible) or I don't know an important missing piece of
information (highly likely).
 
Top