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

ShapeRange.AlternativeText Property (Publisher)

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

Returns or sets a String representing the text displayed by a Web browser in place of the Shape object while the Shape object is being downloaded or when graphics are turned off. Read/write.


expression. AlternativeText

_expression_A variable that represents a ShapeRange object.


The maximum length of the AlternativeText property is 254 characters. Microsoft Publisher returns an error if the text length exceeds this number.


This example sets the alternative text for the selected shape in the active document. This example assumes that you have a publication that the selected shape is a picture of a duck.

Public Sub Alternative_Text() 

 ' The picture of a duck must be selected. 
 Publisher.ActiveDocument.Selection.ShapeRange _ 
 .AlternativeText = "This is a mallard duck." 

End Sub
© 2018 Microsoft