BookmarkAddImage Method | |
Added an image from file to bookmark selection
Namespace:
SIC.OpenDocumentFormat.MSWord
Assembly:
SIC.OpenDocumentFormat (in SIC.OpenDocumentFormat.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax public void AddImage(
string pImageFile,
string pBookmarkName,
string pStyle = "",
bool pNewParagraph = false,
double pWidth = 0,
double pHeight = 0
)
Public Sub AddImage (
pImageFile As String,
pBookmarkName As String,
Optional pStyle As String = "",
Optional pNewParagraph As Boolean = false,
Optional pWidth As Double = 0,
Optional pHeight As Double = 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
SIC.OpenDocumentFormat.MSWord.Document lDOC = new SIC.OpenDocumentFormat.MSWord.Document("Brief.doc");
lDOC.Bookmark.AddImage("Logo.emf", "bmkLogo", pWidth: 5.6);
lDOC.Close();
See Also