Author | Topic: Outlook activex | |
---|---|---|
Itai Ben-Artzi | Outlook activex on Thu, 24 Oct 2013 11:05:29 -0700 I’d like to select a file attachment and insert it “as text” via outlook activex. What is the correct method and syntax? Many thanks, -Itai | |
César Calvo | Re: Outlook activex on Thu, 24 Oct 2013 20:41:40 +0200 Hi itai, some like see below but outlook has to be open, I have to discover how to open outlook first where I say 'olApp := CreateObject("Outlook.Application")'. I hope this can be useful for you, for me yes. Regards, César. #include "outlook.ch" PROCEDURE ENVIO cRUT := 'D:\ETEBDE\ETE_BDE.xlsx' olApp := CreateObject("Outlook.Application") oMail := olApp:CreateItem( olMailItem ) oMail:Recipients:Add(cEMA1) IF cEMA2 != "NO" oMail:Cc := cEMA2 ENDIF oMail:Subject := '000_ETE_BDE_RESUMEN' oMail:Body := "Message body" IF Time() < "14:00" cTXT := "Buenos días," + CHR(10) cTXT += CHR(10) cTXT += "enviamos información relativa a las operaciones de transacciones con el exterior para informar a Banco de España correspondientes al periodo " + SubStr(oCur1:FieldGet("PER"),1,4) + "/" + SubStr(oCur1:FieldGet("PER"),5,2) + "." cTXT += CHR(10) + "Un saludo." cTXT += CHR(10) + "_________________________________________" cTXT += CHR(10) + "TGestiona España" cTXT += CHR(10) + "Gerencia de Tesorería" cTXT += CHR(10) + "Jefatura de Operaciones" cTXT += CHR(10) + "_________________________________________" oMail:Body := cTXT ELSE cTXT := "Buenas tardes," + CHR(10) cTXT += CHR(10) cTXT += "enviamos información relativa a las operaciones de transacciones con el exterior para informar a Banco de España correspondientes al periodo " + SubStr(oCur1:FieldGet("PER"),1,4) + "/" + SubStr(oCur1:FieldGet("PER"),5,2) + "." cTXT += CHR(10) + "Un saludo." cTXT += CHR(10) + "_________________________________________" cTXT += CHR(10) + "TGestiona España" cTXT += CHR(10) + "Gerencia de Tesorería" cTXT += CHR(10) + "Jefatura de Operaciones" cTXT += CHR(10) + "_________________________________________" oMail:Body := cTXT ENDIF oAttach := oMail:Attachments oAttach:Add(cRUT) oMail:Send olApp:Destroy() ENDIF Infobox("Enviada la información por e-mail","Atención") RETURN ------------------------------------------------------------ "Itai Ben-Artzi" escribió en el mensaje de noticias:339cc697$76adc3cf$bef5@news.alaska-software.com... I’d like to select a file attachment and insert it “as text” via outlook activex. What is the correct method and syntax? Many thanks, -Itai |