Table of contents
TOC
Collapse the table of content
Expand the table of content

Fields.AddHorizontalInVertical Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Inserts horizontal text into a stream of vertical text and returns the new horizontal text as a Field object.

Syntax

expression. AddHorizontalInVertical( Range, Text)

_expression_A variable that represents a Fields object.

Parameters

NameRequired/OptionalData TypeDescription
RangeRequiredTextRangeThe text range at which to insert the horizontal text.
TextRequiredStringThe text to be horizontally inserted.

Return Value

Field

Example

This example horizontally inserts the text "horizontal test" after the existing vertical text in shape one on page one of the active publication.

Dim rngTemp As TextRange 
Dim fldTemp As Field 

With ActiveDocument.Pages(1).Shapes(1) 
 Set rngTemp = .TextFrame.TextRange.InsertAfter("") 

 Set fldTemp = .TextFrame.TextRange.Fields _ 
 .AddHorizontalInVertical(Range:=rngTemp, Text:="horizontal test") 
End With
© 2018 Microsoft