Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
clara clara is offline
external usenet poster
 
Posts: 13
Default Align multiple tables and pics

Hi all,

There are many tables ( each followed by a picture ). Is there any way to
make all these to be left aligned.

Clara
--
thank you so much for your help
  #2   Report Post  
Posted to microsoft.public.word.tables
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default Align multiple tables and pics

Try this macro on a copy of the document:

Sub AlignAllTablesLeft()
Dim t As Table
For Each t In ActiveDocument.Tables
t.Rows.Alignment = wdAlignRowLeft
t.Rows.LeftIndent = 0
Next t
End Sub

If you need assistance, see
http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP


"clara" wrote in message
...
Hi all,

There are many tables ( each followed by a picture ). Is there any
way to make all these to be left aligned.

Clara
--
thank you so much for your help






  #3   Report Post  
Posted to microsoft.public.word.tables
clara clara is offline
external usenet poster
 
Posts: 13
Default Align multiple tables and pics

Hi Stefan,

Thank you very much. Your method works very well. On my document, there are
also many pictures which I pasted from Microsoft Paint application.And also I
need to align these pictures with tables on left side. I tried to find
whether there is a collection called pictures in ActiveDocument, but I
failed. Could you help me again.

Clara
--
thank you so much for your help


"Stefan Blom" wrote:

Try this macro on a copy of the document:

Sub AlignAllTablesLeft()
Dim t As Table
For Each t In ActiveDocument.Tables
t.Rows.Alignment = wdAlignRowLeft
t.Rows.LeftIndent = 0
Next t
End Sub

If you need assistance, see
http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP


"clara" wrote in message
...
Hi all,

There are many tables ( each followed by a picture ). Is there any
way to make all these to be left aligned.

Clara
--
thank you so much for your help







  #4   Report Post  
Posted to microsoft.public.word.tables
Lene Fredborg Lene Fredborg is offline
external usenet poster
 
Posts: 1,291
Default Align multiple tables and pics

Below you will find two macros that you may use to position the pictures. The
first macro will find all pictures (shapes) that have wrapping style "In line
with text" and align them left with 0 as the left indent. The second macro
will find all pictures (shapes) that have other wrapping styles and set their
left position to 0.

You may only need one of the macros. Note that you may need to adjust the
macro(s) - for example, if your document contains other shapes (e.g.
drawings), the macros will also manipulate their position.

Sub AlignShapesLeft_1()
'Treat pictures that are "In line with text"
Dim oShape As InlineShape
For Each oShape In ActiveDocument.InlineShapes
With oShape.Range.ParagraphFormat
.Alignment = wdAlignParagraphLeft
.LeftIndent = 0
End With
Next oShape

End Sub

Sub AlignShapesLeft_2()

'Treat pictures that are NOT "In line with text"
Dim oShape As Shape
For Each oShape In ActiveDocument.Shapes
oShape.Left = 0
Next oShape

End Sub

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"clara" wrote:

Hi Stefan,

Thank you very much. Your method works very well. On my document, there are
also many pictures which I pasted from Microsoft Paint application.And also I
need to align these pictures with tables on left side. I tried to find
whether there is a collection called pictures in ActiveDocument, but I
failed. Could you help me again.

Clara
--
thank you so much for your help


"Stefan Blom" wrote:

Try this macro on a copy of the document:

Sub AlignAllTablesLeft()
Dim t As Table
For Each t In ActiveDocument.Tables
t.Rows.Alignment = wdAlignRowLeft
t.Rows.LeftIndent = 0
Next t
End Sub

If you need assistance, see
http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP


"clara" wrote in message
...
Hi all,

There are many tables ( each followed by a picture ). Is there any
way to make all these to be left aligned.

Clara
--
thank you so much for your help







Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get tables to align vertically danacton Page Layout 0 January 17th 07 05:40 PM
Align tables in form Damon Grieves Tables 2 June 29th 06 02:12 PM
Can Word overflow text to leave pages with pics/tables text-free? Struggling Student Tables 4 March 10th 06 01:21 AM
Grey guideframe around pics/ tables is gone... saram Page Layout 1 January 24th 06 07:39 PM
Center Align Word tables Cocosa New Users 2 January 5th 05 05:05 PM


All times are GMT +1. The time now is 10:40 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"