DocJavaScriptActionA

Document properties, JavaScript

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to DocJavaScriptAction and string arguments are interpreted using the current SetAnsiMode code page

This function is used to add JavaScript to document events. This JavaScript will be executed when, for example, the document is closed or printed.

Syntax

Delphi

Function DLDocJavaScriptActionA(InstanceID: Integer; ActionType, JavaScript: PAnsiChar): Integer;

DLL

int DLDocJavaScriptActionA(int InstanceID, const char* ActionType, const char* JavaScript);

Parameters

ActionTypeThe event to attach the JavaScript to: "WC" = Will close "WS" = Will save "DS" = Did save "WP" = Will print "DP" = Did print
JavaScriptThe JavaScript to attach to the event.

Return values

0The specified ActionType was not valid
1The JavaScript was added successfully