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

ParagraphFormat.AttachedToText Property (Publisher)

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

True if the Font or ParagraphFormat object is attached to a TextRange object. If the object is attached to a TextRange object, the document will be updated when properties of the object are changed. If the object is not attached, nothing in the document will be changed until the object is applied to a TextRange or Style object. Read-only Boolean.

Syntax

expression. AttachedToText

_expression_A variable that represents a ParagraphFormat object.

Example

This example duplicates the font formatting; then it checks to see if the duplicated formatting is attached to a text range and if it is not, it attaches the formatting to the second shape.

Sub DuplicateText() 
 Dim fntTemp As Font 
 With ActiveDocument.Pages(1) 
 Set fntTemp = .Shapes(1).TextFrame.TextRange.Font.Duplicate 
 If fntTemp.AttachedToText <> True Then _ 
 ActiveDocument.Pages(1).Shapes(2) _ 
 .TextFrame.TextRange.Font = fntTemp 
 End With 
End Sub
© 2018 Microsoft