Document Scripting

Revision as of 04:02, 9 September 2024 by Mike (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.