I think I know how to use mailto: via vfp7 (with help from Hentzenworks
Megafox). Can anybody tell me if it is possible to automate attachments
using the plain vanilla vfp objects. As is probably obvous I want to
automate the emailing of reports. I have got them coming out in pdf or Doc
format and I want to attach them to email addresses stored in the table.

Many thanks

Stephen

RE: email attachments in vfp7 by BankimDesai

BankimDesai
Mon Dec 06 00:29:01 CST 2004

You can use the following source code. The mail with attachements can be
found int the Mircrosoft Outlook box. This works fine in VFP5 .


procedure email
#define mailitem 0
#define importancelow 0
#define importancenormal 1
#define importancehigh 2

oOutLookObject = CreateObject("Outlook.Application")
oEmailItem = oOutLookObject.CreateItem(mailitem)
mailreceipt=memailaddress
mailsubject=msubject
mailfile=tmpfile
with oEmailItem
.Recipients.Add(mailreceipt) && uses the Recipients collection
.Subject = mailsubject
.Importance = importancehigh
.Body = "name of the sender"
.Attachments.Add('&mailfile') && Note that the fully qualified path and
file is required.
.Send
endwith
release oEmailItem
release oOutLookObject
return


"Stephen & Shelagh Ibbs" wrote:

> I think I know how to use mailto: via vfp7 (with help from Hentzenworks
> Megafox). Can anybody tell me if it is possible to automate attachments
> using the plain vanilla vfp objects. As is probably obvous I want to
> automate the emailing of reports. I have got them coming out in pdf or Doc
> format and I want to attach them to email addresses stored in the table.
>
> Many thanks
>
> Stephen
>
>
>

Re: email attachments in vfp7 by Stephen

Stephen
Mon Dec 06 05:41:41 CST 2004

Many thanks Bankim. This may work for Otlook but my users all use Outlook
Express. It doesn't work on my machine with OE. Do you know if it is
possible to create an object of Outlook Express?

Many thanks

Stephen

"Bankim Desai" <BankimDesai@discussions.microsoft.com> wrote in message
news:8C47B95D-2117-4306-9FBB-851EAC149643@microsoft.com...
> You can use the following source code. The mail with attachements can be
> found int the Mircrosoft Outlook box. This works fine in VFP5 .
>
>
> procedure email
> #define mailitem 0
> #define importancelow 0
> #define importancenormal 1
> #define importancehigh 2
>
> oOutLookObject = CreateObject("Outlook.Application")
> oEmailItem = oOutLookObject.CreateItem(mailitem)
> mailreceipt=memailaddress
> mailsubject=msubject
> mailfile=tmpfile
> with oEmailItem
> .Recipients.Add(mailreceipt) && uses the Recipients collection
> .Subject = mailsubject
> .Importance = importancehigh
> .Body = "name of the sender"
> .Attachments.Add('&mailfile') && Note that the fully qualified path and
> file is required.
> .Send
> endwith
> release oEmailItem
> release oOutLookObject
> return
>
>
> "Stephen & Shelagh Ibbs" wrote:
>
>> I think I know how to use mailto: via vfp7 (with help from Hentzenworks
>> Megafox). Can anybody tell me if it is possible to automate attachments
>> using the plain vanilla vfp objects. As is probably obvous I want to
>> automate the emailing of reports. I have got them coming out in pdf or
>> Doc
>> format and I want to attach them to email addresses stored in the table.
>>
>> Many thanks
>>
>> Stephen
>>
>>
>>



Re: email attachments in vfp7 by Fred

Fred
Mon Dec 06 08:56:44 CST 2004

No, Outlook Express does not have an automation model.

--
Fred
Microsoft Visual FoxPro MVP


"Stephen Ibbs" <stephen@datadevelopments.co.uk> wrote in message
news:cp1ghk$79a$1@titan.btinternet.com...
> Many thanks Bankim. This may work for Otlook but my users all use Outlook
> Express. It doesn't work on my machine with OE. Do you know if it is
> possible to create an object of Outlook Express?
>
> Many thanks
>
> Stephen
>
> "Bankim Desai" <BankimDesai@discussions.microsoft.com> wrote in message
> news:8C47B95D-2117-4306-9FBB-851EAC149643@microsoft.com...
>> You can use the following source code. The mail with attachements can be
>> found int the Mircrosoft Outlook box. This works fine in VFP5 .
>>
>>
>> procedure email
>> #define mailitem 0
>> #define importancelow 0
>> #define importancenormal 1
>> #define importancehigh 2
>>
>> oOutLookObject = CreateObject("Outlook.Application")
>> oEmailItem = oOutLookObject.CreateItem(mailitem)
>> mailreceipt=memailaddress
>> mailsubject=msubject
>> mailfile=tmpfile
>> with oEmailItem
>> .Recipients.Add(mailreceipt) && uses the Recipients collection
>> .Subject = mailsubject
>> .Importance = importancehigh
>> .Body = "name of the sender"
>> .Attachments.Add('&mailfile') && Note that the fully qualified path
>> and
>> file is required.
>> .Send
>> endwith
>> release oEmailItem
>> release oOutLookObject
>> return
>>
>>
>> "Stephen & Shelagh Ibbs" wrote:
>>
>>> I think I know how to use mailto: via vfp7 (with help from Hentzenworks
>>> Megafox). Can anybody tell me if it is possible to automate attachments
>>> using the plain vanilla vfp objects. As is probably obvous I want to
>>> automate the emailing of reports. I have got them coming out in pdf or
>>> Doc
>>> format and I want to attach them to email addresses stored in the table.
>>>
>>> Many thanks
>>>
>>> Stephen
>>>
>>>
>>>
>
>



Re: email attachments in vfp7 by Stephen

Stephen
Tue Dec 07 01:46:32 CST 2004

Many thanks Fred - I think I will pay West Wind a visit!

Sincerely

Stephen

"Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
news:e%23GNMP62EHA.3616@TK2MSFTNGP11.phx.gbl...
> No, Outlook Express does not have an automation model.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Stephen Ibbs" <stephen@datadevelopments.co.uk> wrote in message
> news:cp1ghk$79a$1@titan.btinternet.com...
>> Many thanks Bankim. This may work for Otlook but my users all use Outlook
>> Express. It doesn't work on my machine with OE. Do you know if it is
>> possible to create an object of Outlook Express?
>>
>> Many thanks
>>
>> Stephen
>>
>> "Bankim Desai" <BankimDesai@discussions.microsoft.com> wrote in message
>> news:8C47B95D-2117-4306-9FBB-851EAC149643@microsoft.com...
>>> You can use the following source code. The mail with attachements can be
>>> found int the Mircrosoft Outlook box. This works fine in VFP5 .
>>>
>>>
>>> procedure email
>>> #define mailitem 0
>>> #define importancelow 0
>>> #define importancenormal 1
>>> #define importancehigh 2
>>>
>>> oOutLookObject = CreateObject("Outlook.Application")
>>> oEmailItem = oOutLookObject.CreateItem(mailitem)
>>> mailreceipt=memailaddress
>>> mailsubject=msubject
>>> mailfile=tmpfile
>>> with oEmailItem
>>> .Recipients.Add(mailreceipt) && uses the Recipients collection
>>> .Subject = mailsubject
>>> .Importance = importancehigh
>>> .Body = "name of the sender"
>>> .Attachments.Add('&mailfile') && Note that the fully qualified path
>>> and
>>> file is required.
>>> .Send
>>> endwith
>>> release oEmailItem
>>> release oOutLookObject
>>> return
>>>
>>>
>>> "Stephen & Shelagh Ibbs" wrote:
>>>
>>>> I think I know how to use mailto: via vfp7 (with help from Hentzenworks
>>>> Megafox). Can anybody tell me if it is possible to automate attachments
>>>> using the plain vanilla vfp objects. As is probably obvous I want to
>>>> automate the emailing of reports. I have got them coming out in pdf or
>>>> Doc
>>>> format and I want to attach them to email addresses stored in the
>>>> table.
>>>>
>>>> Many thanks
>>>>
>>>> Stephen
>>>>
>>>>
>>>>
>>
>>
>
>



Re: email attachments in vfp7 by Fred

Fred
Tue Dec 07 22:44:26 CST 2004

I don't know how Excel does it, maybe via MAPI. I've never had to send an
email on a system without the full-blown Outlook on it.

--
Fred
Microsoft Visual FoxPro MVP


<tnhoe@pc.jaring.my> wrote in message news:41b54e63_2@news.tm.net.my...
> "Fred Taylor"
>
> > No, Outlook Express does not have an automation model.
>
> I just curious how Excel can do this.
> It can send to default email software even Outlook Express with
> attachment.
>
> Of course I don't now how it is done.
>
> Regards
> Hoe
>