Help with formatting

A

ArtZ

Hi,

I am new to the Forum and need some help to format certain sections of
Word document. This formatting is repetitive and takes a long time b
hand since there are 10 pages in the document.

Seems that some simple VBA should be able to to do this. In the sampl
document below, there is a date range which needs to be changed to a 1
font and bolded. Also I would like the first sentence of each paragrap
bold and underlined.

Below is an example of the document layout:

Code
-------------------


MAY 23-29
Bay Area KidFest. Entertainment shows, face painting, balloon hats, games, inflatable bounces and crawls, KidArt, Monster Mural, Dora the Explorer and Diego, Kid's Town America, SportStars Field of Dreams, Radio Disney, sports games and rides. May 25-27. Mount
Sarah Drain of Concord, Calif. and her daughter Catherine, 1, dance together to the music at the Walnut Creek Art and Wine Festival at Heather Farm Park in Walnut Creek Calif. Saturday June 6, 2009.(Dan Rosenstrauch/Staff) ( DAN ROSENSTRAUCH )
Diablo High School, 2450 Grant St., Concord. $5. 925-671-3287, www.KidFestConcord.com.
Civil War Battles and Encampment. 32nd annual. Visit encampments of Union and Confederate soldiers and witness historic battles. Be advised that occasional loud cannon and gunfire may be heard as part of the re-enactment activities during the day. It is not advisable to bring dogs to this event. Contact the camp for schedules. May 25-27. $5-$29. Roaring Camp and Big Trees Railroad, 5355 Graham Hill Road, Felton. 831-335-4484, www.roaringcamp.com.

-------------------


In this case, May-23-39 would be changed to bold and the font to 14. Ba
Area KidFest. and Civil War Battles and Encampment. would be bold an
underlined.

Can anyone in the Forum help with VBA or another option to quickl
format the entire document as described above?

Any help is greatly appreciated.

Thanks,

Ar
 
S

Stefan Blom

To add bold and underline to the first sentence of each paragraph, you
should be able to use code such as the following:

Sub ApplyFormattingToFirstSentence()
Dim p As Paragraph
Dim s As Range
For Each p In ActiveDocument.Paragraphs
With p.Range.Sentences(1).Font
..Bold = True
..Underline = wdUnderlineSingle
End With
Next p
End Sub

See http://www.gmayor.com/installing_macro.htm for more.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ASK Field Formatting 1
civil war 0
Word 2003 formatting 3
Formatting issue with track changes 2
(Notebook View) Formatting Hell 1
Copying Formatting 2
FORMATTING NUISANCE 2
Major problem with Track Changes 1

Top