hi everyone until now i have a problem about mail merge..
please give me an code snippet using webspeed..
how do i read the template in the server??
this program works on gui.. but in webspeed is not working..
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("c:\MergeTemplate.doc",,YES,FALSE).
/* set Mail Merge object */
chMerge = chDoc:MailMerge.
/* open the data source */
chMerge:OpenDataSource("c:\MergeData.txt").
chMerge:SuppressBlankLines = FALSE.
/* merge target is a NEW word Doc */
chMergeestination = {&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.
did i miss something?? please help me..
please give me an code snippet using webspeed..
how do i read the template in the server??
this program works on gui.. but in webspeed is not working..
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("c:\MergeTemplate.doc",,YES,FALSE).
/* set Mail Merge object */
chMerge = chDoc:MailMerge.
/* open the data source */
chMerge:OpenDataSource("c:\MergeData.txt").
chMerge:SuppressBlankLines = FALSE.
/* merge target is a NEW word Doc */
chMergeestination = {&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.
did i miss something?? please help me..