Visual Basic scripts for DDE - Manage Documents - Foundation 24.1 - Foundation 24.1 - Ready - Perceptive Content - external

Manage Documents

Platform
Perceptive Content
Product
Manage Documents
Release
Foundation 24.1
License

You can use the following functions in any script in application plan types. These functions are useful with the DDE LearnMode type.

The Test button in the script editor does not always produce valid results when using these functions. To test your code, try saving the template, closing the application plan, and then clicking on the icon in the Perceptive Content toolbar to view the results.

Note: These Dynamic Data Exchange methods are deprecated in Perceptive Content 6.7. In previous versions of Perceptive Content, you used Folder and Tab. In Perceptive Content 6.7, these supported document key variables changed to Field1 and Field2. While Folder and Tab are currently supported, they may be deprecated in future versions.
Script Name Syntax
DDEExecute int DDEExecute(int Channel, STR CommandStr)
DDEInitiate int Channel = DDEInitiate(STR AppStr, STR TopicStr)
DDEPoke int DDEPoke(int Channel, STR ItemStr, STR DataStr)
DDERequest STR DDERequest(int Channel, STR ItemStr)
DDETerminate int DDETerminate(int Channel)

DDE Script Example

The following example script reads keys from Microsoft Excel.

nChannel = DDEInitiate("excel", "test.xls")
if nChannel <> -1 then
s = DDERequest(nChannel, "R1C1")
field1 = left(s, len(s)-2)
s = DDERequest(nChannel, "R1C2")
field2 = left(s, len(s)-2)
s = DDERequest(nChannel, "R1C3")
field3 = left(s, len(s)-2)
s = DDERequest(nChannel, "R1C4")
field4 = left(s, len(s)-2)
s = DDERequest(nChannel, "R1C5")
field5 = left(s, len(s)-2)
DDETerminate(nChannel)
end if