Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2005

Tip: Looking for answers? Try searching our database.

Add Blank Lines Prior to Table - Word2002

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gwhit - 27 Sep 2005 23:46 GMT
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.
Helmut Weber - 28 Sep 2005 09:31 GMT
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
Tony Jollans - 28 Sep 2005 13:56 GMT
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.

> Hello,
>
[quoted text clipped - 17 lines]
>
> Thank you.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.