Click here to Skip to main content
15,921,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Constructor & Destructor Pin
Daniel Turini28-Mar-03 6:20
Daniel Turini28-Mar-03 6:20 
GeneralRe: Constructor & Destructor Pin
Makover28-Mar-03 6:37
Makover28-Mar-03 6:37 
GeneralRe: Constructor & Destructor Pin
Maximilien28-Mar-03 6:49
Maximilien28-Mar-03 6:49 
GeneralRe: Constructor & Destructor Pin
Alvaro Mendez28-Mar-03 8:18
Alvaro Mendez28-Mar-03 8:18 
GeneralRe: Constructor & Destructor Pin
Tim Smith28-Mar-03 7:25
Tim Smith28-Mar-03 7:25 
GeneralRe: Constructor & Destructor Pin
jbarton28-Mar-03 7:36
jbarton28-Mar-03 7:36 
GeneralBuild like Visual Studio Pin
calgonit28-Mar-03 5:48
calgonit28-Mar-03 5:48 
GeneralOutlook Automation :-( ( attachment) Pin
Braulio Dez28-Mar-03 5:28
Braulio Dez28-Mar-03 5:28 
Hi,

I'm trying to send one email with on attachment, via outlook automation, my code is:

COutlookApplication& App = COutlookApplication::Instance();
Outlook::_MailItemPtr pMail = App.CreateMailItem();
pMail->To = (LPCSTR) m_sTo;
pMail->CC = (LPCSTR) m_sCopyTo;
pMail->Subject = (LPCSTR) m_sSubject;
pMail->Body = (LPCSTR) m_sBody;

// ---
COleVariant Param((long) Outlook::olByReference);
COleVariant Position((long) 0);
_bstr_t     DisplayName =  "whatever";
_bstr_t     Path        = "C:\\Delete\\test.doc";

Outlook::AttachmentsPtr pAtt = pMail->Attachments;
pAtt->Add(Path, Param, Position, DisplayName);
// ---

pMail->Send();


The result that I get... Email in the outbox... but.. with no attachment Frown | :-( ... anyone knows what can be the reason ?

Thanks in advance, Greetings

Braulio
GeneralSolution... sh*tty automation Pin
Braulio Dez28-Mar-03 5:47
Braulio Dez28-Mar-03 5:47 
Generaldialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 5:21
professionalJoan M28-Mar-03 5:21 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Big Art28-Mar-03 5:33
Big Art28-Mar-03 5:33 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 5:39
professionalJoan M28-Mar-03 5:39 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Big Art28-Mar-03 5:57
Big Art28-Mar-03 5:57 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 6:15
professionalJoan M28-Mar-03 6:15 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Big Art28-Mar-03 6:51
Big Art28-Mar-03 6:51 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 7:05
professionalJoan M28-Mar-03 7:05 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Big Art28-Mar-03 7:19
Big Art28-Mar-03 7:19 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 7:27
professionalJoan M28-Mar-03 7:27 
GeneralMutual exclusion Pin
act_x28-Mar-03 5:20
act_x28-Mar-03 5:20 
GeneralRe: Mutual exclusion Pin
Neville Franks28-Mar-03 10:08
Neville Franks28-Mar-03 10:08 
GeneralWindows Registry blues Pin
fd975028-Mar-03 5:02
professionalfd975028-Mar-03 5:02 
GeneralRe: Windows Registry blues Pin
Chris Losinger28-Mar-03 5:20
professionalChris Losinger28-Mar-03 5:20 
GeneralRe: Windows Registry blues Pin
Big Art28-Mar-03 5:22
Big Art28-Mar-03 5:22 
GeneralRe: Windows Registry blues Pin
fd975030-Mar-03 20:07
professionalfd975030-Mar-03 20:07 
QuestionHowto configure doxygen ? Pin
yarp28-Mar-03 5:00
yarp28-Mar-03 5:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.