Problem with Mailmerge

DaveAston

New Member
Hi, I am trying to get mailmerge working on site and have come across a probelm.

The customer is using OpenEdge 10.1b and accesses the application via citrix. Word is installed on each users machine. Dependant upon the load the server will switch between one of 3 servers.

I am using the mailmerge program which i picked up from one of the threads

DEFINE VARIABLE chWordApp AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE chDoc AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE chMerge AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE chNewDoc AS COM-HANDLE NO-UNDO.

&GLOBAL-DEFINE wdSendToNewDocument 0

CREATE "Word.Application" chWordApp.
chWordApp:ScreenUpdating = TRUE.
chWordApp:visible = FALSE.
chWordApp:displayAlerts = FALSE.

/* open the template document */
chDoc = chWordApp:documents:OPEN("e:\MMerge\MergeDoc.dotx",,YES,FALSE).

/* set Mail Merge object */
chMerge = chDoc:MailMerge.

/* open the data source */
chMerge:OpenDataSource("e:\MMerge\MData.txt").
chMerge:SuppressBlankLines = FALSE.

/* merge target is a NEW word Doc */
chMerge:Destination = {&wdSendToNewDocument}.

/* Run merge */
chMerge:EXECUTE.

/* get handle to new document (the merged one) */
chNewDoc = chWordApp:ActiveDocument.
chNewDoc:fields:update.
chWordApp:visible = TRUE.

RELEASE OBJECT chDoc.
RELEASE OBJECT chMerge.
RELEASE OBJECT chNewDoc.
RELEASE OBJECT chWordApp.

This works fine on my machine where both progress and word are installed, however it will not work on site as an error pops up telling the
The automation server for Word.Application is not registered properly
Please reinstall this server or try registering again.

I am not sure why i am getting this message

It could be because word is not installed on the application server
It could be because the users installation of word has the C2r problem mentioned in other threads
It could be a routing issue

Any advice on this would be most grateful

Thanks in advance
 

RealHeavyDude

Well-Known Member
AFAIK, OCX integration or OLE automation only work as long as the OCX or the OLE automation server is registered on the machine where the Progress session is running. If that's the Citrix server, the the required OCX or OLE automation server ( in your case MS Word ) must be installed on the Citrix box. At least that's the way we run it around here although we are using a different version of OE10 and most likely a different version of MS Office too.

Heavy Regards, RealHeavyDude.
 

DaveAston

New Member
Thanks RealHeavy

If I have the customer load word onto the Citrix server / s am i to assume that the doc will print from that servers default printer?

Dave
 

RealHeavyDude

Well-Known Member
AFAIK yes. But we have a distinct Citrix team which is handling Citrix integration here and from that I know that it is possible to use user specific settings from the user's machine on the Citrix server. For example we use strong authentication which uses a SSL certificate located on a personal smart card which the user inserts into the smart card reader of her/his machine to logon to the system. The application itself is running on the Citrix server and uses the Internet Explorer via OLE automation to send the SSL client certificate to an authentication web service and that OLE automation server access the smart card on the user's machine. So I know that there is more possible than one might think of - but I have no glue as to how one does achieve fancy stuff like that. You would need to contact a Citrix guru for that.

Heavy Regards, RealHeavyDude.
 

DaveAston

New Member
Thanks Real

The customer has just mailed me to say they have installed word on the application server so will give it a test from there.

Dave
 

adisney

New Member
Copied from our setup instructions for scheduled processes running Progress programs which do the type of task you describe above:
...
11. Run the Windows program Dcomcnfg.exe and ensure that the new user has access to launch the automation object for Word. Detailed instructions are listed below.
...


Steps for Dcomcnfg setup:



1. On the server, go to Start > Run, then enter dcomcnfg.exe and click OK:


2. In the Component Services window, double click on the Component Services > Computers > My Computer > DCOM Config.


3. Choose the appropriate object (it'll be something like "Microsoft Word Document") then right-click with the mouse to go to the Properties.

4. Click on the Security tab and choose Customize for Launch and Access Permissions.

5. In each of those properties, choosing Customize will enable the Edit button. Click the Edit button and add the Autorun user ID to allow the Launch and Access Right. Grant full permissions.
 

DaveAston

New Member
Sounds interesting, Unfortunately the customers app server is falling ove with lack of disk space so unable to anything at the moment but will certainly try this
 
Top