Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating outlook attachments from OleBoundControls
Message
From
14/08/2002 14:23:23
Sasha Burkich
Senior Systems Analyst
British Columbia, Canada
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00688721
Message ID:
00689679
Views:
20
Hi John,

try saving the general field to a file first. Then specify that file as a source for an attachment.

This thread will get you going:
General field export Thread #565634 Message #565634

Sasha

>Hi all,
>Hope someone can help,
>
>I've got an oleboundcontrol (controlsource is a 'general' field type) that can accept any ole object - usually a Cut and paste item such as a BMP or JPG although it can accept just about anything.
>
>I am trying to add the contents of the general field 'call it' Att_gen to a task in outlook
>
>the problem I'm facing is that the attachments.add method only accept data from a file
>
>The code I've got looks something like :-
>
>objOutlook = CREATEOBJECT("Outlook.Application")
>oNameSpace = objOutlook.GetNameSpace("MAPI")
>oTaskFolder = oNameSpace.Folders( lcThisFolder )
>oTask = oTaskFolder.Items.Add()
>oTask.Subject = 'My test Message'
>otask.attachments.add( Read comment below )
>
>I want to be able to specify my 'General' field called Att_gen to be added as the attachment.
>
>Hope someone can help, I've just about run out of things to try and the hairs going rapidly.
>
>Many thanks
>John
Sasha Burkich
Consultant
Victoria, BC
Previous
Reply
Map
View

Click here to load this message in the networking platform