Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automating Message Creation in OutLook Express from VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00265210
Message ID:
00265874
Vues:
13
You are correct, sir.

In which case you're stuck with more generic MAPI functions.

>Am I right in thinking that Outlook Express doesn't have an object model like Outlook? An OE user would need one of the more generic solutions suggested on this thread.
>
>>Simon. Here's my mail button class. Note that the property SendtoSource stored the email address you want to send to. You can tie that to THISFORM.Textbox.Value or a field or whatever.
>>
>>
>>DEFINE CLASS mailbutton AS commandbutton
>>	AutoSize = .F.
>>	Height = 24
>>	Width = 24
>>	ToolTipText = "Send email"
>>	Name = "mailbutton"
>>	SendtoSource = .F.
>>	PROCEDURE Click
>>		IF VARTYPE(oOutlook) # "O"
>>		   PUBLIC oOutlook
>>		   oOutlook=CREATEOBJECT("Outlook.Application")
>>		ENDIF
>>		cSendTo=EVAL(THIS.SendToSource)
>>		IF EMPTY(cSendTo) OR VARTYPE(cSendTo) # "C"
>>		   RETURN
>>		ENDIF
>>		olItem=oOutlook.CreateItem(0)
>>		olItem.Recipients.Add(cSendTo)
>>		olItem.Display
>>		olItem=.NULL.
>>	ENDPROC
>>ENDDEFINE
>>
>>
>>>Hi
>>>
>>>I have application that contains information about indiviudals including their e-mail address. I would like to add a button to the form so that when it is clicked OutLook or OutLook Express is opened and a new messeage is create for the e-Mail address shown on my form. The user could simply enter a Subject and Message and send the e-mail. Does anyone have experience doing this and can you give some example of the code required?
>>>
>>>Thanks
>>>Simon
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform