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 / December 2004

Tip: Looking for answers? Try searching our database.

Formatting individual paragraphs in a Cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dak - 05 Dec 2004 09:44 GMT
I'm stuck.
I'm writing a few one-line paragraphs into a table cell (actually a
label in a word-created blank labels document). All of the text is
aligned left. But for a few cells, I want to add an additional
one-line paragraph that's aligned right and italicized.  But whatever
I try ends up formatting the whole cell as right aligned and
italicized.

I want the label to look sorta like this:

    First Name Last Name
    Address
    Department
                           Specialty Text

Does anyone know a way to format the last paragraph of a cell without
it affecting the whole cell?

Here's my latest attempt that still didn't work.

Dim rng As Range
Set rng = ActiveDocument.Tables(1).Cell(nRow, nColumn).Range
          With rng
              .InsertAfter "Specialty Text"
              .Previous wdParagraph
              .Expand wdParagraph
              .Font.Italic = True
              .Select
              .ParagraphFormat.Alignment = wdAlignParagraphRight
          End With
dak - 05 Dec 2004 18:27 GMT
Oh, wait, I figured it out:

        Set rng = ActiveDocument.Tables(1).Cell(nRow, nColumn).Range
         rng.InsertAfter "Specialty Text"
         rng.Collapse wdCollapseEnd
         rng.MoveEnd wdParagraph, -1
         rng.ParagraphFormat.Alignment = wdAlignParagraphRight

Yay!
--Dak

> I'm stuck.
> I'm writing a few one-line paragraphs into a table cell (actually a
[quoted text clipped - 26 lines]
>                .ParagraphFormat.Alignment = wdAlignParagraphRight
>            End With

Rate this thread:






 
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



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