Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Table

Status
Not open for further replies.

BSando

Technical User
Jun 29, 2003
73
0
0
AU
I have a excel workbook that I want to open from Access and copy and paste cell data to a new word document, but I want to paste the data in to a table.

Any ideas?

Thank you an advance

Some people make things happen, some watch while things happen, and some wonder 'What happened?'
 
Hallo,

To produce a Word Table using VBA you can create an RTF document using code.
If you can do VBA code and are prepared to learn a bit of RTF then you can do this:

Create a Word document with the table how you want it, then save it as RTF. Make sure you fill in the table with values like CELL1,0, CELL1,1, CELL1,2, CELL2,0, CELL2,1, CELL2,2 etc. Use at least 3 rows. Then you can open the RTF file in Notepad and look at the Source code. Create some code to open a plain text file (with RTF extension) and turn the RTF lines into a set of Print statements so that they re-create the file when run.
You should be able to see where the values need to go, so now you can replace the CELL1,0 etc. references with the data you want (once you've worked out where a table row begins and ends). It is completely hellish, but does work, if you persevere.

- Frink

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top