target property
ShapeBase.target property
Gets or sets the target frame for the shape hyperlink.
@property
def target(self) -> str:
...
@target.setter
def target(self, value: str):
...
Remarks
The default value is an empty string.
Examples
Shows how to insert a shape which contains an image, and is also a hyperlink.
doc = aw.Document()
builder = aw.DocumentBuilder(doc=doc)
shape = builder.insert_image(file_name=IMAGE_DIR + 'Logo.jpg')
shape.href = 'https://forum.aspose.com/'
shape.target = 'New Window'
shape.screen_tip = 'Aspose.Words Support Forums'
# Ctrl + left-clicking the shape in Microsoft Word will open a new web browser window
# and take us to the hyperlink in the "HRef" property.
doc.save(file_name=ARTIFACTS_DIR + 'Image.InsertImageWithHyperlink.docx')
See Also
- module aspose.words.drawing
- class ShapeBase