MajorityParagraphFormat Property

Microsoft Publisher Visual Basic

object that represents the paragraph formatting applied to most of the paragraphs in a text range.

expression.MajorityParagraphFormat

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example applies the paragraph formatting applied to a majority of the paragraphs in the first shape to the paragraphs in the second shape on the first page of the active document. This example assumes that there are at least two shapes on page one of the active publication.

Sub SetFontName()
    Dim fmt As ParagraphFormat
    With ActiveDocument.Pages(1)
        Set fmt = .Shapes(1).TextFrame.TextRange _
                .MajorityParagraphFormat
        .Shapes(2).TextFrame.TextRange.ParagraphFormat = fmt
    End With
End Sub