Word Complex Table - Copy into code for

Chrisjd2

Board Regular
Joined
Mar 1, 2016
Messages
61
Hi,

Is there a way, to copy an existing table into my code, so I can re-write it back from the code.

Basically, I have a spreadsheet that opens an existing Word document with said Table in, then I add text so certain cell locations in the table.

I would like the excel to open a blank word document, and write the exact table to the document, and then I put my data in..

This just saves having to have a word doc be with the spreadsheet all the time, instead the excel will generate this.

Does that make sense lol? :rofl:

Chris
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Chris

I'm not quite following the sequence here, where are you copying from/to, where/when are you adding data?

Also, would it just be data you would be dealing with or would it also include formatting?
 
Upvote 0
Norie,

At the moment I have a 'Blank Template.doc' which is just a table, with nested tables inside text etc.. (Basically it is an entry form)

Now, this document is opened from excel where I pass variables into the word doc to autocomplete the entry form.

Ideally, I don't want to be opening the 'Blank Template.doc' each time. It would be better to create a Word document from my excel code, and then for the code to write the table to the word file. Then I can pass my variables in to complete the entry form..

..............

Without trying create the code to generate the table, is it possible to convert the existing table in a code form? So I can then use it when I create the new table?

I'm not sure how well I've explained that?

Sorry if you don't understand lol
 
Upvote 0
I don't think that's going to be possible, for a start I don't think a Word table can exist outside a Word document.

Why are you against opening 'Blank Template.doc'?
 
Upvote 0

Forum statistics

Threads
1,223,789
Messages
6,174,579
Members
452,573
Latest member
Cpiet

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top