Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vfp to outlook 1

Status
Not open for further replies.

kitnba

MIS
Jul 31, 2000
132
HK
myRecipient =myItem.Recipients.Add(alltrim(a_sender[n])+'@xxx.com.hk'))

How do I change this command in the CC field? I want add our address to CC field.

Thanks
 
kitnba

oOutLookObject = CreateObject("Outlook.Application")
oEmailItem = oOutLookObject.CreateItem(0)
WITH oEmailItem
.Recipients.Add("moe@3stooges.com")
.CC = "you@yourcompany.com"
.Subject = "Automation sample"
.Importance = IMPORTANCENORMAL
.Body = "This is easy!"
.Send
ENDWITH

RELEASE oEmailItem
RELEASE oOutLookObject


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
if I want to cc 4 email address, what can I do?
can I use myRecipient =myItem.cc.Add(alltrim(a_sender[n])+'@xxxx.hk')) this same code?
 

No exactly

Var1 = "you@yourcompany.com"
Var2 = "us@ourcompany.com"

myItem.cc = Var1+";"+var2

Note CC does not require the ADD function

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
I am doing it exactly the way Mike has suggested. (var1+";"+var2 and so on)

But kitnba has not specified whether he (or she ? Difficult to make out. Pardon me pl.) is creating the object as Mike has put it.

i.e.
oOutLookObject = CreateObject("Outlook.Application")
oEmailItem = oOutLookObject.CreateItem(0)


But if one is using MAPI and default email system is set to Outlook, this can be achived by setting RecipType property of MAPIMessage control to 2.

Puru
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top