Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Preserve table format after InsertDatabase method?
From VB6, I'm calling the InsertDatabase method on a Word doc to insert
an Access table into a Word table. When I do this directly in Word, I can use \* mergeformat to prevent Word from changing my table's format. However, I cannot figure out how to prevent this auto-formatting from overriding my pre-set table formats when I do it in code. I've also tried programmatically restoring my column widths, etc. after the InsertDatabase call, but I get an error saying "The SetWidth method or property is not available because some or all of the object does not refer to a table". Any help would be appreciated. Barry |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Preserve table format after InsertDatabase method?
Unless you are using the built-in table formats and options (which you can
specify in the InsertDatabase method call, I haven't checked but I think you will need to do ActiveDocument.InsertDatabase .... Selection.Tables(1).Select or perhaps Dim rngTable As Range Set rngTable = Selection.Tables(1).Range With rngTable ' do your stuff End With Peter Jamieson "Barry" wrote in message ups.com... From VB6, I'm calling the InsertDatabase method on a Word doc to insert an Access table into a Word table. When I do this directly in Word, I can use \* mergeformat to prevent Word from changing my table's format. However, I cannot figure out how to prevent this auto-formatting from overriding my pre-set table formats when I do it in code. I've also tried programmatically restoring my column widths, etc. after the InsertDatabase call, but I get an error saying "The SetWidth method or property is not available because some or all of the object does not refer to a table". Any help would be appreciated. Barry |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Table of contents numbering not consistent with page numbering format | Tables | |||
Table format problems | Tables | |||
Table headers/footers and layout | Page Layout | |||
How to Avoid Word 2003 Table Style Problems | Tables | |||
Getting the format of a table | Tables |