Click here to Skip to main content
15,885,244 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Richard MacCutchan7-May-11 5:22
mveRichard MacCutchan7-May-11 5:22 
AnswerRe: Problem Opening Email when using InvokeHelper in C++ Pin
barneyman7-May-11 15:23
barneyman7-May-11 15:23 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729928-May-11 6:12
Member 29729928-May-11 6:12 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
barneyman8-May-11 13:04
barneyman8-May-11 13:04 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729928-May-11 22:27
Member 29729928-May-11 22:27 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
barneyman8-May-11 22:37
barneyman8-May-11 22:37 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729928-May-11 22:50
Member 29729928-May-11 22:50 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729928-May-11 23:11
Member 29729928-May-11 23:11 
Just to let you know that I followed what you said, but it threw an unhandled exception.

Here is the code as it on screen

OpenOutlookNewMessageWithMsgFile(CString filePath)

//Call CreateItemFromTemplate to create new mailitem using late binding
LPDISPATH mailItem

static BYTE params[] = VTS_BSTR VTS_VARIANT ;

BSTR bFilePath = filePath.AllocSysString();

outlookApp->InvokeHelper(0x10b, DISPATCH_METHOD, VT_DISPATCH, (void*)&mailItem, params, bFilePath, NULL);

outlookMailItem = new COleDispatchDriver(mailItem);

//Set User Properties
SetProperties();

//Set Display of Mail Item
VARIANT_BOOL modal = VARIANT_FALSE;
static BYTE params2[] = VTS_I4;
outlookMailItem->InvokeHelper(oxf0a6,DISPATCH_METHOD,VT_EMPTY, NULL, params2, &modal);

So, this is the whole for creating an email from template, but it is on outlookApp->InvokeHelper that I am having a problem. What am I doing wrong?
AnswerRe: Problem Opening Email when using InvokeHelper in C++ Pin
Roger Broomfield9-May-11 1:37
Roger Broomfield9-May-11 1:37 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729929-May-11 2:04
Member 29729929-May-11 2:04 
GeneralRe: Problem Opening Email when using InvokeHelper in C++ Pin
Member 29729929-May-11 2:25
Member 29729929-May-11 2:25 
QuestionWant logic or code for this in c Pin
KIDYA6-May-11 4:08
KIDYA6-May-11 4:08 
AnswerRe: Want logic or code for this in c Pin
CodyDaemon6-May-11 4:18
CodyDaemon6-May-11 4:18 
GeneralRe: Want logic or code for this in c Pin
KIDYA6-May-11 4:30
KIDYA6-May-11 4:30 
AnswerRe: Want logic or code for this in c Pin
Luc Pattyn6-May-11 4:30
sitebuilderLuc Pattyn6-May-11 4:30 
GeneralRe: Want logic or code for this in c Pin
CPallini6-May-11 10:17
mveCPallini6-May-11 10:17 
GeneralRe: Want logic or code for this in c Pin
Luc Pattyn6-May-11 15:30
sitebuilderLuc Pattyn6-May-11 15:30 
QuestionEncrypting the existing file and folder Pin
sarfaraznawaz6-May-11 1:22
sarfaraznawaz6-May-11 1:22 
AnswerRe: Encrypting the existing file and folder Pin
ShilpiP6-May-11 1:42
ShilpiP6-May-11 1:42 
AnswerRe: Encrypting the existing file and folder Pin
Richard MacCutchan6-May-11 3:05
mveRichard MacCutchan6-May-11 3:05 
GeneralRe: Encrypting the existing file and folder Pin
sarfaraznawaz11-May-11 22:49
sarfaraznawaz11-May-11 22:49 
GeneralRe: Encrypting the existing file and folder Pin
Richard MacCutchan11-May-11 23:22
mveRichard MacCutchan11-May-11 23:22 
Questionhow to assign unsigned char in c++? Pin
mathivanaan6-May-11 1:00
mathivanaan6-May-11 1:00 
AnswerRe: how to assign unsigned char in c++? Pin
Chris Losinger6-May-11 1:01
professionalChris Losinger6-May-11 1:01 
QuestionRe: how to assign unsigned char in c++? Pin
Niklas L6-May-11 1:18
Niklas L6-May-11 1:18 

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.