Inserting a table with Format from Excel into Word

A

ajaypondicherry

I would like to export a table from excel into word while preserving
the excel formatting. I would like the word doc to appear as if I had
selected the table in excel; copied it; and pasted it into word. I
understand the .Text and insert.after.text functions, but I am not
sure how to preserve the table format.
 
C

Charlie Hoffpauir

I would like to export a table from excel into word while preserving
the excel formatting. I would like the word doc to appear as if I had
selected the table in excel; copied it; and pasted it into word. I
understand the .Text and insert.after.text functions, but I am not
sure how to preserve the table format.

Why not just copy and paste?
Charlie Hoffpauir
http://freepages.genealogy.rootsweb.com/~charlieh/
 
A

ajaypondicherry

Why not just copy and paste?
Charlie Hoffpauirhttp://freepages.genealogy.rootsweb.com/~charlieh/

What is the best way to paste something into word? I was thinking of
setting the table as a variable and inserting it into the word
document, but I am not sure what kind of variable I should use. Is it
the range variable?

Thanks for the help so far.
 
A

ajaypondicherry

Ok so I discovered how to paste the table into word, but it is
autmoatically pasting it at the very top of the document. I would like
it to be pasted at the end or at least after the text which I am
inserting.

'This is the text which will be entered in the MS Word document
With mywdRange
..Text = "Text goes here"

'This is an excel table which will be pasted into the word doc with
formatting
Sheet2.Range("A5:D11").Copy
wdApp.Selection.Paste
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top