Link to home
Start Free TrialLog in
Avatar of newbie46
newbie46

asked on

Can Access VBA control the lines drawn within a Word table or the way in which data is written to the Word table?

Please see attached Word doc. Access 2007 VBA is appending rows to the table’s columns 1 – 9.
Through VBA, can you control the lines being drawn and control how many cells are used for text? For example, ‘Passed’ spans 2 cells and I don’t want to see the line drawn between the 2 cells in this case.
In addition, I would like 'Report Findings (see Appendix A for details)' to span 6 columns without drawing lines in between the columns.

I am using the following code to append the text to the table: (Passed, Failed, Summary are then squished within these cells. Is there a way to have these span more than 1 cell?)
set rw = doc.Tables(1).Rows.Add
with rw
  .Cells(4).Range.Text="Passed"
  .Cells(6).Range.Text="Failed"
  .Cells(8).Range.Text="Summary"
end with
Doc1.docx
ASKER CERTIFIED SOLUTION
Avatar of Graham Mandeno
Graham Mandeno
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial