PropertyCaptionHAlignment Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.  

PivotHAlignmentEnum

PivotHAlignmentEnum can be one of these PivotHAlignmentEnum constants.
plHAlignAutomatic
plHAlignCenter
plHAlignLeft
plHAlignRight

 

expression.PropertyCaptionHAlignment

expression   Required. An expression that returns a PivotView object.

Example

This example formats the alignment and the font of member property captions and values in the active view of PivotTable1.

  Sub Format_MemberProperties()

    Dim ptView
    Dim ptConstants

    Set ptConstants = PivotTable1.Constants

    ' Set a variable to the current PivotTable view.
    Set ptView = PivotTable1.ActiveView

    ' The following three lines of code format the
    ' font for member property captions.
    ptView.PropertyCaptionFont.Name = "Tahoma"
    ptView.PropertyCaptionFont.Size = 8
    ptview.PropertyCaptionFont.Bold = True

    ' Left-align the member property captions.
    ptview.PropertyCaptionHAlignment = ptConstants.plHAlignLeft

    ' The following two lines of code format the
    ' font for member property values.
    ptview.PropertyValueFont.Name = "Tahoma"
    ptview.PropertyValueFont.Size = 8

    ' Right-align the member property values.
    ptview.PropertyValueHAlignment = ptConstants.plHAlignRight

End Sub