Document Scripting: Difference between revisions
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 30: | Line 30: | ||
===== Set Image: ===== | ===== Set Image: ===== | ||
document.SetBookmarkImage("BookmarkName", Picture Item); | document.SetBookmarkImage("BookmarkName", Picture Item); | ||
document.SetBookmarkImageFromFile("BookmarkName", pictureFileName); | |||
===== Delete Bookmark: ===== | ===== Delete Bookmark: ===== | ||
document.DeleteBookmark(("BookmarkName"); | document.DeleteBookmark(("BookmarkName"); | ||
==== Process standard bookmarks ==== | |||
zinBL.DocumentFunctions.ProcessStandardBookmarks(source, otherParty, parameters, zinBL, imgWidth, imgHeight); | |||
* source - ZinWord Document to set standard bookmarks on. | |||
* otherParty - OtherParty Loaded. | |||
* parameters - parameters from the document. | |||
* zinBL - the Zinform Business Layer. | |||
* imgWidth and imgHeight are the logo size width and height. |
Latest revision as of 04:02, 9 September 2024
ZinWord Document
Create New:
ZinWord document = new ZinWord();
Load Document:
By FileName:
document.LoadDocument(documentFileName);
By Stream:
document.LoadStream(MemoryStream);
Save Document:
document.SaveDocument(documentFileName);
Documents are saved by their file types used in the extension eg: MyFile.pdf will save a pdf while MyFile.docx will save a word document.
Bookmarks:
Set String:
document.SetBookmarkString("BookmarkName", "Value");
Set Hyperlink:
document.SetBookmarkHyperLink("BookmarkName", HyperLink Item);
Set HTML:
document.SetBookmarkHtml("BookmarkName", "Value");
Set Image:
document.SetBookmarkImage("BookmarkName", Picture Item);
document.SetBookmarkImageFromFile("BookmarkName", pictureFileName);
Delete Bookmark:
document.DeleteBookmark(("BookmarkName");
Process standard bookmarks
zinBL.DocumentFunctions.ProcessStandardBookmarks(source, otherParty, parameters, zinBL, imgWidth, imgHeight);
- source - ZinWord Document to set standard bookmarks on.
- otherParty - OtherParty Loaded.
- parameters - parameters from the document.
- zinBL - the Zinform Business Layer.
- imgWidth and imgHeight are the logo size width and height.