ShapeRange.AlternativeText property (Publisher)

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.

Syntax

expression.AlternativeText

expression A variable that represents a ShapeRange object.

Remarks

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

Example

This example sets the alternative text for the selected shape in the active document. This example assumes that you have a publication in which 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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.