Tip>Designer

Using FillPoints with Word field formulas

 

Article #:

0040

Contributor:

Ricky Burrell

GF version:

4.0

Applies to:

GhostFill ServerList

Last updated:

May 9, 2002

Description

Access a GhostFill Server or plug-in from another programming environment that supports automation.

Explanation

You can access a GhostFill Server or plug-in using code similar to the following.

 

NOTE

This code example is in GhostFill script and needs to be converted to the relevant development environment (e.g., Delphi, Visual Basic or C++) with the appropriate syntax changes.

 

Click here to view a step-by-step example.

  1. Create a new ServerList object:

%[SL = CreateObject('GFServerList.ServerList')]

  1. Add all the registered servers that are used at run time:

%[SL.AddServers('[RunTime]')]

  1. Now you can access the specific server or plug-in. There are 3 ways to do this:

e.g.,%[ObjDialogs = SL.Dialogs] or %[ObjLists = SL.Lists]

e.g.,%[ObjDialogs = SL.ServerFromProgID('GFDialogs.Dialogs').OleObject] or %[ObjLists = SL.ServerFromProgID('GFLists.Lists').OleObject]

e.g.,%[ObjDialogs = SL.ServerFromCLSID('{80EE4054-B905-11D3-98C8-00105A6BEAC7}').OleObject] or %[ObjLists = sl.ServerFromCLSID('{727708E4-E9EC-11D3-869B-009027909DA1}').OleObject]

  1. Add your code.

  2. Once you have finished referencing the GhostFill object, you need to release it:

%[SL.Empty]

%[SL = '']

 

NOTE

If you are using an ActiveX control, e.g., the RTFFiller control, there is no need to create a ServerList as one already exists. Simply access the list using script similar to the following: %[SL = RTFFiller1.ServerList]. You don't need to release the object either. See the GhostFill Technical Reference Guide for more information on the ActiveX controls.