#1   Report Post  
Posted to microsoft.public.word.docmanagement
Narendra Boga Narendra Boga is offline
external usenet poster
 
Posts: 22
Default alignment macro

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

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cheryl Flanders Cheryl Flanders is offline
external usenet poster
 
Posts: 123
Default alignment macro

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

On May 15, 7:18 pm, Narendra Boga
wrote:
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


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Narendra Boga Narendra Boga is offline
external usenet poster
 
Posts: 22
Default alignment macro

wow..... thats great.

Thank You Cheryl Flanders.




"Cheryl Flanders" wrote:

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

On May 15, 7:18 pm, Narendra Boga
wrote:
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



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Cheryl Flanders Cheryl Flanders is offline
external usenet poster
 
Posts: 123
Default alignment macro

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.

--
Peter Aitken
Author, MS Word for Medical and Technical Writerswww.tech-word.com




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
Spell Check a protected Form with a Macro & already have forms picture macro [email protected] Microsoft Word Help 2 October 25th 07 04:11 PM
Pause an executing Word Macro to enter info and then Macro continu strongwell Microsoft Word Help 1 August 11th 06 06:57 PM
Paragraph alignment in a macro jezzica85 Microsoft Word Help 2 July 23rd 06 06:50 AM
macro runs from keyboard, but not from macro button-why? BobW Microsoft Word Help 7 May 10th 06 11:33 PM
2000 to 2002 macro and "Could not open macro storage" Art Farrell Mailmerge 1 December 6th 04 12:40 PM


All times are GMT +1. The time now is 10:56 AM.

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"