My VEE program runs some tests then opens a blank Word doc., adds title info, Matlab graphs, paragraph text etc.etc. all fairly straightforward.
I then want to create a blank table, insert it at the current insertion point (i.e. where the cursor is) then load column headings and results into the table.
I can create a table with chosen number of rows/columns but the insertion point depends on a 'Range' variable which I can only get to work if I make up the value for it - then it ends up in the wrong place if preceding content varies in length.
As for adding text to cells: everything ends up in cell (1,1) or I get unhelpful .NET error messages. E.G., in the screenshot, one problem is the Sel.MoveRight~ transaction.
Any advice would be welcome.
Regards,
Kevin
I then want to create a blank table, insert it at the current insertion point (i.e. where the cursor is) then load column headings and results into the table.
I can create a table with chosen number of rows/columns but the insertion point depends on a 'Range' variable which I can only get to work if I make up the value for it - then it ends up in the wrong place if preceding content varies in length.
As for adding text to cells: everything ends up in cell (1,1) or I get unhelpful .NET error messages. E.G., in the screenshot, one problem is the Sel.MoveRight~ transaction.
Any advice would be welcome.
Regards,
Kevin
Instead of starting with a blank document, try using a document that has the chart and other things already in place where you want. This template file will eliminate a lot of code from your program.
To get the text where you want you might have to create named fields in the word doc. Then in VEE just write to those field names. That is probably the easist way.
-Bill