Click or drag to resize

BookmarkAddImage Method

Added an image from file to bookmark selection

Namespace:  SOWIDocument.Word
Assembly:  SOWIDocument.Word (in SOWIDocument.Word.dll) Version: 22.2.10.1 (22.2.10.450)
Syntax
public void AddImage(
	string pImageFile,
	string pBookmarkName,
	string pStyle = "",
	bool pNewParagraph = false,
	double pWidth = 0,
	double pHeight = 0
)

Parameters

pImageFile
Type: SystemString
Image file
pBookmarkName
Type: SystemString
Bookmark name to adds image
pStyle (Optional)
Type: SystemString
Style name (must exists)
pNewParagraph (Optional)
Type: SystemBoolean
New paragraph after image
pWidth (Optional)
Type: SystemDouble
Width of image in centimetre
pHeight (Optional)
Type: SystemDouble
Height of image in centimetre
Remarks
Can parameter pWidth or parameter pHeight specify so will calculate image size automatic.

Examples
This example added a logo image into a bookmark
SOWIDocument.Word.Document lDOC = new SOWIDocument.Word.Document("Brief.doc");
lDOC.Bookmark.AddImage("Logo.emf", "bmkLogo", pWidth: 5.6);      // width in centimetre
lDOC.Close();
See Also