Kbase P70849: ActiveX: Word 2003 MailMerge gives errors when Data merged comes from a second Word document
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  13/03/2008 |
|
Status: Verified
SYMPTOM(s):
ActiveX: Word 2003 MailMerge gives errors
Error occurred while accessing component property/method: <property or method name>.
<COM message>
Error code: <Program name> (5890)
Error occurred while accessing component property/method: EXECUTE.
The method or property is not available because the document is not a mail merge main document.
Error code: 0x80020009 <4gl procedure name> (5890)
MailMerge within Word 2003 works without problems
Data merged comes from second Word document
CAUSE:
Datasource for mailmerge not specified via 4GL procedure.
Word 2003 expects the program calling the COM interface to set the datasource for the mailmerge operation and will raise errors if this is not done.
FIX:
Insert a call to OpenDataSource() before calling Execute().
For example:
...
chDoc = chWord:Documents:Open('primary.doc'). /* primary mailmerge document */
chDoc:MailMerge:OpenDataSource('secondary.doc'). /* The data source document */
chDoc:MailMerge:Execute(). /* Perform actual MailMerge */
...