Add Blank Lines Prior to Table - Word2002

G

Gwhit

Hello,

I have a two-column Word table which is triggered in MS Access. It properly
opens Word, sets the Access data into the respective columns, obediently
autoformats the Word table, saves the formatted document into a folder as
..doc file on the server and opens the "Envelope Visible" feature for
emailing.

However, not being yet savvy in the Word-side of the programming spectrum, I
have one final need and am asking if someone could please help me out with
the proper method of inserting a couple of vbCrLf's prior to the insertion of
the table? I've searched many sites as well as the Word vb help files and
have probably seen the answer many times over but am not properly
assimilating into the block of ice between my shoulder blades, sometimes
known as my head.

Also, does anyone know if the table autoformatting process forces the table
to the top of the document anyway, where it could potentially override my
needed vbCrLf (or best procedure) coding?

Thank you.
 
H

Helmut Weber

Hi,

to insert an empty paragraph before a table.
if the table is at the documents start,
place the cursor in the first row and use
Selection.SplitTable.
If the table is not at the documents start,
this method works as well, but then there are others ways, too.

AFAIK, autoformatting doesn't move a table.

Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 
T

Tony Jollans

It isn't clear how you are adding the table to the document, but I assume it
is done in the code from Access; if so, you should be able to precede it with:

(appWord.)Selection.TypeParagraph

as many times as you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top