Document Scripting: Difference between revisions
 Created page with "=== 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);<blockquote>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. </blockquote>"  | 
				No edit summary  | 
				||
| (4 intermediate revisions by the same user not shown) | |||
| Line 13: | Line 13: | ||
==== Save Document: ====  | ==== Save Document: ====  | ||
document.SaveDocument(documentFileName);<blockquote>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. </blockquote>  | document.SaveDocument(documentFileName);<blockquote>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. </blockquote>  | ||
==== 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.  | |||
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.