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 / June 2008

Tip: Looking for answers? Try searching our database.

Apply "Space Before 18 pt" on all the paragraph immediately following     tables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
andreas - 28 Jun 2008 08:16 GMT
Dear Experts,

I would like to achieve the following using Word VBA:

I would like to apply an "18 pt space before" to the paragraph
immediately following a table.

For example:

Table cell  Table cell  Table cell
Table cell  Table cell  Table cell
Table cell  Table cell  Table cell
Paragraph immediately following the table (spacing before: 18 pt)

The macro should loop through the document and apply this to all
occurrences.

Help is much appreciated. Thank you very much in advance. Regards,
Andreas
Doug Robbins - Word MVP - 28 Jun 2008 08:34 GMT
Use

Dim atable As Table
Dim arange As Range
For Each atable In ActiveDocument.Tables
   Set arange = atable.Range
   arange.Collapse wdCollapseEnd
   arange.ParagraphFormat.SpaceBefore = 18
Next atable

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Dear Experts,
>
[quoted text clipped - 15 lines]
> Help is much appreciated. Thank you very much in advance. Regards,
> Andreas
andreas - 29 Jun 2008 12:50 GMT
On 28 Jun., 09:34, "Doug Robbins - Word MVP" <d...@REMOVECAPSmvps.org>
wrote:
> Use
>
[quoted text clipped - 35 lines]
>
> - Zitierten Text anzeigen -

Dear Doug,

great. It works fine. thank you very much for your kind help. Regards,
Andreas
 
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



©2010 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.