Hi,
Being relatively new in the Acucobol field, I need help in creating an email with an attachment using the Windows MAPI. I run the Acucorp Version 6.1 Compiler on a Windows 2000 box.
I came across the following code to create the mail item:
WORKING STORAGE
01 w01-attach pic x(15) value "\attach.html".
77 outlook-handle handle of application.
77 mail-handle handle of mailitem.
77 namespc-handle handle of NameSpace.
...
create application of Outlook handle in outlook-handle
modify outlook-Handle, @GetNameSpace("MAPI")
giving namespc-handle
...
modify Outlook-Handle, createitem (olMailItem) giving
mail-handle
modify mail-handle @subject ws-subj
modify mail-handle @body ws-body-tab
modify mail-handle @To ws-to
modify mail-handle @cc ws-cc
The above successfully creates the mail item and sets up the email address, subject etc.
My problem is in an attempt to append an attachment to this mail item!
I've tried the following (and others!) to no avail...
modify mail-handle @Attachments w01-attach
...didn't work. Got this error: 'ATTACHMENTS' must be a 'put' property or method of '@MAILITEM'
Please help!
Being relatively new in the Acucobol field, I need help in creating an email with an attachment using the Windows MAPI. I run the Acucorp Version 6.1 Compiler on a Windows 2000 box.
I came across the following code to create the mail item:
WORKING STORAGE
01 w01-attach pic x(15) value "\attach.html".
77 outlook-handle handle of application.
77 mail-handle handle of mailitem.
77 namespc-handle handle of NameSpace.
...
create application of Outlook handle in outlook-handle
modify outlook-Handle, @GetNameSpace("MAPI")
giving namespc-handle
...
modify Outlook-Handle, createitem (olMailItem) giving
mail-handle
modify mail-handle @subject ws-subj
modify mail-handle @body ws-body-tab
modify mail-handle @To ws-to
modify mail-handle @cc ws-cc
The above successfully creates the mail item and sets up the email address, subject etc.
My problem is in an attempt to append an attachment to this mail item!
I've tried the following (and others!) to no avail...
modify mail-handle @Attachments w01-attach
...didn't work. Got this error: 'ATTACHMENTS' must be a 'put' property or method of '@MAILITEM'
Please help!