G
Gabriel
Hi, back with another newbie question. I'm writing an add-in for Outlook 2003
in VC++. I'm trying to move a message I've accessed by using the
Explorer->get_Selection method to the "Deleted Items" folder, but I'm running
into trouble. *Part* (hopefully all?) of the problem is I don't know what the
first parameter for GetNamespace is supposed to be (I just have a placeholder
there. Here's what I tried:
CComPtr <Outlook::_NameSpace> spNamespace;
CComPtr <Outlook::MAPIFolder> spFolder;
// Need to know what to pass for first parameter:
m_spApp->GetNamespace((unsigned short*)1, &spNamespace);
if (spNamespace == NULL)
MessageBox(NULL,"No Namespace","Namespace",MB_OK);
spNamespace->GetDefaultFolder(olFolderDeletedItems, &spFolder);
dispItem = NULL;
mailPtr2->Move(spFolder,&dispItem);
(mailPtr2 is a mail item pointer and is getting set correctly.) Outlook
crashes at the GetNamespace call. Other than that, does my reasoning look
sound? Let me know if I can provide more info.
Thanks in advance!
-Gabriel
in VC++. I'm trying to move a message I've accessed by using the
Explorer->get_Selection method to the "Deleted Items" folder, but I'm running
into trouble. *Part* (hopefully all?) of the problem is I don't know what the
first parameter for GetNamespace is supposed to be (I just have a placeholder
there. Here's what I tried:
CComPtr <Outlook::_NameSpace> spNamespace;
CComPtr <Outlook::MAPIFolder> spFolder;
// Need to know what to pass for first parameter:
m_spApp->GetNamespace((unsigned short*)1, &spNamespace);
if (spNamespace == NULL)
MessageBox(NULL,"No Namespace","Namespace",MB_OK);
spNamespace->GetDefaultFolder(olFolderDeletedItems, &spFolder);
dispItem = NULL;
mailPtr2->Move(spFolder,&dispItem);
(mailPtr2 is a mail item pointer and is getting set correctly.) Outlook
crashes at the GetNamespace call. Other than that, does my reasoning look
sound? Let me know if I can provide more info.
Thanks in advance!
-Gabriel