alignment macro

  • Thread starter Thread starter Narendra Boga
  • Start date Start date
N

Narendra Boga

hi all.

I have a document with different align formatting.
Ex:
Land and land rights
Transportation infrastructure
Land improvements
Buildings and improvements
Machinery and equipment
Telecommunication equipment
and infrastructure
Mature plantations
Transportation equipment
Office equipment, furniture
and fixtures
----------------------
For this I want to align all lines completely left. I recorded on macro
viz. spaces. but it is not working properly. please help me.
Sub spaces()
' Macro recorded 5/16/2008 by naren
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " ^w"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub


Thank You
Narendara Boga
 
You don't need a macro. Highlight all of the text, then press Ctrl +
E, then Ctrl + L. The Ctrl+ E centers text and the Ctrl + L left
aligns text.

Cheryl
 
hi all.

I have a document with different align formatting.
Ex:
Land and land rights
Transportation infrastructure
Land improvements
Buildings and improvements
Machinery and equipment
Telecommunication equipment
and infrastructure
Mature plantations
Transportation equipment
Office equipment, furniture
and fixtures
----------------------
For this I want to align all lines completely left. I recorded on macro
viz. spaces. but it is not working properly. please help me.
Sub spaces()
' Macro recorded 5/16/2008 by naren
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " ^w"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub


Thank You
Narendara Boga

Is your alignment achieved using paragraph alignmentt commands? The just
select all the paras and click the toolbar button for the desired
alignment. But, if you put spaces at the start of each line then you'll
just have to delete them. Aligning with spaces is something you should
never do.
 
If the spacebar was pressed at the beginning of each line, centering
the text first with Ctrl + E will remove those spaces, then Ctrl + L
will left align all text. The same can be achieved with the toolbar
alignment buttons.

Cheryl
 
(e-mail address removed)>, (e-mail address removed)
says...
If the spacebar was pressed at the beginning of each line, centering
the text first with Ctrl + E will remove those spaces, then Ctrl + L
will left align all text. The same can be achieved with the toolbar
alignment buttons.

Cheryl
Is your alignment achieved using paragraph alignmentt commands? The just
select all the paras and click the toolbar button for the desired
alignment. But, if you put spaces at the start of each line then you'll
just have to delete them. Aligning with spaces is something you should
never do.

Well, how abut that! I never knew that the centering command would
remove leading spaces!
 
Back
Top