|
|
|
date: Wed, 12 Mar 2008 23:31:53 -0700 (PDT),
group: microsoft.public.platformsdk.mapi
back
Re: Dragging mail to "Personal Folders" disappears it
Hi Dmitry,
I am doing it like this.
After opening message store.(msg_store)
1. get the property value.
IMAPIFolder *ipmroot;
SPropValue *ipm_eid;
HRESULT hr;
SizedSPropTagArray(1,columns)={1,{PR_IPM_SUBTREE_ENTRYID}};
2. OpenEntry
ULONG pcount;
LPSPropValue lpsprop=NULL;
hr=msg_store->GetProps((SPropTagArray*)&columns,0,&pcount,ipm_eid);
ULONG ipmroottype;
hr=msg_store->OpenEntry(ipm_eid->Value.bin.cb,(ENTRYID*)ipm_eid->Value.bin.lpb,NULL,0,&ipmroottype,(IUnknown**)&ipmroot);
3. Iterate Through the folders.
And when i opened folders i am getting only standard folders and i believe
those mails are not inside any of these folders.
From where should i fetch those mail (mails inside "Personal Folders").
It is contained in which folder ?
A little example code will be helpful?
Thank You
"Dmitry Streblechenko" wrote in message
news:uL0pykzhIHA.944@TK2MSFTNGP05.phx.gbl...
> Open the folder pointed to by the PR_IPM_SUBTREE_ENTRYID property on the
> parent store (IMsgStore).
> If you only need to recover the messages, why do you need programmatic
> access? Open them from the Outlook UI or use MFCMAPI or OutlookSpy.
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "miztaken" wrote in message
> news:e7lIYwZhIHA.5824@TK2MSFTNGP03.phx.gbl...
>> Ya i have already done that.
>> But how to access such Mail Items through MAPI ?
>>
>>
>>
>> "Dmitry Streblechenko" wrote in message
>> news:%23$Z9v5ShIHA.4152@TK2MSFTNGP02.phx.gbl...
>>> Turn off the folder home page for the root folder and Outlook will show
>>> all the child messages in that folder.
>>>
>>> Dmitry Streblechenko (MVP)
>>> http://www.dimastr.com/
>>> OutlookSpy - Outlook, CDO
>>> and MAPI Developer Tool
>>>
>>> wrote in message
>>> news:9a0b4399-c24a-4ca8-95ec-47d23e86f662@s13g2000prd.googlegroups.com...
>>>> Hi there,
>>>> I just dragged some of my mails to the root Folder i.e. Personal
>>>> Folders
>>>> and its gone now.
>>>> How to recover them from MAPI.
>>>> It must be stored somewhere.
>>>>
>>>> Also i have a PST (PST 2) with some mails but it is not shown in any
>>>> folders, it is present in root level folder (Personal Folders)
>>>>
>>>> I have a condition like:
>>>>
>>>> Profile 1
>>>> PST 1 (default)
>>>> PST 2
>>>> Here content of PST 2 is shown.
>>>>
>>>> Profile 2
>>>> PST 2 (default)
>>>> Here content of PST 2 is not shown.
>>>>
>>>> I dont have a clue how is this happening.
>>>>
>>>> Please help me out here.
>>>>
>>>> Thank You
>>>> miztaken
>>>
>>>
>>
>>
>
>
date: Mon, 17 Mar 2008 14:38:54 +0545
author: miztaken
Re: Dragging mail to "Personal Folders" disappears it
Same question: what do you see in OutlookSpy ot MFCMAPI?
Did you iterate through teh contenst table of the root IPM folder?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"miztaken" wrote in message
news:%23taV6wAiIHA.4344@TK2MSFTNGP03.phx.gbl...
> Hi Dmitry,
> I am doing it like this.
>
> After opening message store.(msg_store)
>
> 1. get the property value.
>
> IMAPIFolder *ipmroot;
> SPropValue *ipm_eid;
> HRESULT hr;
> SizedSPropTagArray(1,columns)={1,{PR_IPM_SUBTREE_ENTRYID}};
>
> 2. OpenEntry
>
> ULONG pcount;
> LPSPropValue lpsprop=NULL;
> hr=msg_store->GetProps((SPropTagArray*)&columns,0,&pcount,ipm_eid);
> ULONG ipmroottype;
> hr=msg_store->OpenEntry(ipm_eid->Value.bin.cb,(ENTRYID*)ipm_eid->Value.bin.lpb,NULL,0,&ipmroottype,(IUnknown**)&ipmroot);
>
> 3. Iterate Through the folders.
>
> And when i opened folders i am getting only standard folders and i believe
> those mails are not inside any of these folders.
> From where should i fetch those mail (mails inside "Personal Folders").
> It is contained in which folder ?
> A little example code will be helpful?
> Thank You
>
> "Dmitry Streblechenko" wrote in message
> news:uL0pykzhIHA.944@TK2MSFTNGP05.phx.gbl...
>> Open the folder pointed to by the PR_IPM_SUBTREE_ENTRYID property on the
>> parent store (IMsgStore).
>> If you only need to recover the messages, why do you need programmatic
>> access? Open them from the Outlook UI or use MFCMAPI or OutlookSpy.
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "miztaken" wrote in message
>> news:e7lIYwZhIHA.5824@TK2MSFTNGP03.phx.gbl...
>>> Ya i have already done that.
>>> But how to access such Mail Items through MAPI ?
>>>
>>>
>>>
>>> "Dmitry Streblechenko" wrote in message
>>> news:%23$Z9v5ShIHA.4152@TK2MSFTNGP02.phx.gbl...
>>>> Turn off the folder home page for the root folder and Outlook will show
>>>> all the child messages in that folder.
>>>>
>>>> Dmitry Streblechenko (MVP)
>>>> http://www.dimastr.com/
>>>> OutlookSpy - Outlook, CDO
>>>> and MAPI Developer Tool
>>>>
>>>> wrote in message
>>>> news:9a0b4399-c24a-4ca8-95ec-47d23e86f662@s13g2000prd.googlegroups.com...
>>>>> Hi there,
>>>>> I just dragged some of my mails to the root Folder i.e. Personal
>>>>> Folders
>>>>> and its gone now.
>>>>> How to recover them from MAPI.
>>>>> It must be stored somewhere.
>>>>>
>>>>> Also i have a PST (PST 2) with some mails but it is not shown in any
>>>>> folders, it is present in root level folder (Personal Folders)
>>>>>
>>>>> I have a condition like:
>>>>>
>>>>> Profile 1
>>>>> PST 1 (default)
>>>>> PST 2
>>>>> Here content of PST 2 is shown.
>>>>>
>>>>> Profile 2
>>>>> PST 2 (default)
>>>>> Here content of PST 2 is not shown.
>>>>>
>>>>> I dont have a clue how is this happening.
>>>>>
>>>>> Please help me out here.
>>>>>
>>>>> Thank You
>>>>> miztaken
>>>>
>>>>
>>>
>>>
>>
>>
>
>
date: Mon, 17 Mar 2008 10:00:05 -0700
author: Dmitry Streblechenko
Re: Dragging mail to "Personal Folders" disappears it
Hi Dmitry,
> Same question: what do you see in OutlookSpy ot MFCMAPI?
My OutlookSpy expired.
I observed the PST from MFCMAPI.
There when i right clicked on "Top of Personal Folders" and selected
"Open Contents Table" then those message were shown.
> Did you iterate through teh contenst table of the root IPM folder?
I am listing the folders in the messageStore(Personal Folders) but i want to
access IPM Messages as well.
I am doing like this:
After opening message store.(msg_store)
1. get the property value.
IMAPIFolder *ipmroot;
SPropValue *ipm_eid;
HRESULT hr;
SizedSPropTagArray(1,columns)={1,{PR_IPM_SUBTREE_ENTRYID}};
2. OpenEntry
ULONG pcount;
LPSPropValue lpsprop=NULL;
hr=msg_store->GetProps((SPropTagArray*)&columns,0,&pcount,ipm_eid);
ULONG ipmroottype;
hr=msg_store->OpenEntry(ipm_eid->Value.bin.cb,(ENTRYID*)ipm_eid->Value.bin.lpb,NULL,0,&ipmroottype,(IUnknown**)&ipmroot); 3. Iterate Through the folders.IMAPITable *hierarchy;const GUID local_IID_IMAPITable ={0x00020301,0,0,{0xc0,0,0,0,0,0,0,0x46}};hr=ipmroot->OpenProperty(PR_CONTAINER_HIERARCHY,&local_IID_IMAPITable,0,0,(IUnknown**)&hierarchy);//ipmroot is MAPIFOLDERSizedSPropTagArray(3,cols)={3,{PR_ENTRYID,PR_DISPLAY_NAME,PR_SUBFOLDERS}};SRowSet *srows;hr=HrQueryAllRows(hierarchy,(SPropTagArray *)&cols,NULL,NULL,0,&srows);hierarchy->Release();Then i am looping through the srows to get all the standard folderBUT HOW TO ACCESS FILES ?I am confusedThank You
date: Tue, 18 Mar 2008 17:04:42 +0545
author: miztaken
Re: Dragging mail to "Personal Folders" disappears it
I don't get it: what exactly does not work?
1 and 2 are Ok
3. Call IMAPIFolder::GetContentsTable.
4. Call IMAPITable::SetColumns({PR_ENTRYID})
5. IMAPITable::QueryRows or HrQueryAllRows
6. Read the data from the returned PSRowSet and use it to call
IMsgStore::OpenEntry to get teh correspnding IMessage object.
7. Call FreePRows to free the data returned in (5).
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"miztaken" wrote in message
news:OK$21mOiIHA.6032@TK2MSFTNGP03.phx.gbl...
> Hi Dmitry,
>> Same question: what do you see in OutlookSpy ot MFCMAPI?
> My OutlookSpy expired.
> I observed the PST from MFCMAPI.
> There when i right clicked on "Top of Personal Folders" and selected
> "Open Contents Table" then those message were shown.
>
>> Did you iterate through teh contenst table of the root IPM folder?
> I am listing the folders in the messageStore(Personal Folders) but i want
> to access IPM Messages as well.
> I am doing like this:
>
> After opening message store.(msg_store)
> 1. get the property value.
> IMAPIFolder *ipmroot;
> SPropValue *ipm_eid;
> HRESULT hr;
> SizedSPropTagArray(1,columns)={1,{PR_IPM_SUBTREE_ENTRYID}};
> 2. OpenEntry
> ULONG pcount;
> LPSPropValue lpsprop=NULL;
> hr=msg_store->GetProps((SPropTagArray*)&columns,0,&pcount,ipm_eid);
> ULONG ipmroottype;
> hr=msg_store->OpenEntry(ipm_eid->Value.bin.cb,(ENTRYID*)ipm_eid->Value.bin.lpb,NULL,0,&ipmroottype,(IUnknown**)&ipmroot);
> 3. Iterate Through the folders.IMAPITable *hierarchy;const GUID
> local_IID_IMAPITable
> ={0x00020301,0,0,{0xc0,0,0,0,0,0,0,0x46}};hr=ipmroot->OpenProperty(PR_CONTAINER_HIERARCHY,&local_IID_IMAPITable,0,0,(IUnknown**)&hierarchy);//ipmroot
> is
> MAPIFOLDERSizedSPropTagArray(3,cols)={3,{PR_ENTRYID,PR_DISPLAY_NAME,PR_SUBFOLDERS}};SRowSet
> *srows;hr=HrQueryAllRows(hierarchy,(SPropTagArray
> *)&cols,NULL,NULL,0,&srows);hierarchy->Release();Then i am looping through
> the srows to get all the standard folderBUT HOW TO ACCESS FILES ?I am
> confusedThank You
>
date: Tue, 18 Mar 2008 10:16:19 -0700
author: Dmitry Streblechenko
Re: Dragging mail to "Personal Folders" disappears it
Hi dmitry,
Thank a lot.
I used HrQueryAllRows and it worked. I was previously using
IMAPITable::QueryRows and it was not working. I dont know how?
"Dmitry Streblechenko" wrote in message
news:OvtlQuRiIHA.3556@TK2MSFTNGP04.phx.gbl...
>I don't get it: what exactly does not work?
> 1 and 2 are Ok
> 3. Call IMAPIFolder::GetContentsTable.
> 4. Call IMAPITable::SetColumns({PR_ENTRYID})
> 5. IMAPITable::QueryRows or HrQueryAllRows
> 6. Read the data from the returned PSRowSet and use it to call
> IMsgStore::OpenEntry to get teh correspnding IMessage object.
> 7. Call FreePRows to free the data returned in (5).
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "miztaken" wrote in message
> news:OK$21mOiIHA.6032@TK2MSFTNGP03.phx.gbl...
>> Hi Dmitry,
>>> Same question: what do you see in OutlookSpy ot MFCMAPI?
>> My OutlookSpy expired.
>> I observed the PST from MFCMAPI.
>> There when i right clicked on "Top of Personal Folders" and selected
>> "Open Contents Table" then those message were shown.
>>
>>> Did you iterate through teh contenst table of the root IPM folder?
>> I am listing the folders in the messageStore(Personal Folders) but i want
>> to access IPM Messages as well.
>> I am doing like this:
>>
>> After opening message store.(msg_store)
>> 1. get the property value.
>> IMAPIFolder *ipmroot;
>> SPropValue *ipm_eid;
>> HRESULT hr;
>> SizedSPropTagArray(1,columns)={1,{PR_IPM_SUBTREE_ENTRYID}};
>> 2. OpenEntry
>> ULONG pcount;
>> LPSPropValue lpsprop=NULL;
>> hr=msg_store->GetProps((SPropTagArray*)&columns,0,&pcount,ipm_eid);
>> ULONG ipmroottype;
>> hr=msg_store->OpenEntry(ipm_eid->Value.bin.cb,(ENTRYID*)ipm_eid->Value.bin.lpb,NULL,0,&ipmroottype,(IUnknown**)&ipmroot);
>> 3. Iterate Through the folders.IMAPITable *hierarchy;const GUID
>> local_IID_IMAPITable
>> ={0x00020301,0,0,{0xc0,0,0,0,0,0,0,0x46}};hr=ipmroot->OpenProperty(PR_CONTAINER_HIERARCHY,&local_IID_IMAPITable,0,0,(IUnknown**)&hierarchy);//ipmroot
>> is
>> MAPIFOLDERSizedSPropTagArray(3,cols)={3,{PR_ENTRYID,PR_DISPLAY_NAME,PR_SUBFOLDERS}};SRowSet
>> *srows;hr=HrQueryAllRows(hierarchy,(SPropTagArray
>> *)&cols,NULL,NULL,0,&srows);hierarchy->Release();Then i am looping
>> through the srows to get all the standard folderBUT HOW TO ACCESS FILES
>> ?I am confusedThank You
>>
>
>
date: Thu, 20 Mar 2008 11:05:12 +0545
author: miztaken
Re: Dragging mail to "Personal Folders" disappears it
What exactly did not work and how were you calling QueryRows?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"miztaken" wrote in message
news:%239iBVnkiIHA.3740@TK2MSFTNGP03.phx.gbl...
> Hi dmitry,
> Thank a lot.
> I used HrQueryAllRows and it worked. I was previously using
> IMAPITable::QueryRows and it was not working. I dont know how?
>
>
> "Dmitry Streblechenko" wrote in message
> news:OvtlQuRiIHA.3556@TK2MSFTNGP04.phx.gbl...
>>I don't get it: what exactly does not work?
>> 1 and 2 are Ok
>> 3. Call IMAPIFolder::GetContentsTable.
>> 4. Call IMAPITable::SetColumns({PR_ENTRYID})
>> 5. IMAPITable::QueryRows or HrQueryAllRows
>> 6. Read the data from the returned PSRowSet and use it to call
>> IMsgStore::OpenEntry to get teh correspnding IMessage object.
>> 7. Call FreePRows to free the data returned in (5).
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "miztaken" wrote in message
>> news:OK$21mOiIHA.6032@TK2MSFTNGP03.phx.gbl...
>>> Hi Dmitry,
>>>> Same question: what do you see in OutlookSpy ot MFCMAPI?
>>> My OutlookSpy expired.
>>> I observed the PST from MFCMAPI.
>>> There when i right clicked on "Top of Personal Folders" and selected
>>> "Open Contents Table" then those message were shown.
>>>
>>>> Did you iterate through teh contenst table of the root IPM folder?
>>> I am listing the folders in the messageStore(Personal Folders) but i
>>> want to access IPM Messages as well.
>>> I am doing like this:
>>>
>>> After opening message store.(msg_store)
>>> 1. get the property value.
>>> IMAPIFolder *ipmroot;
>>> SPropValue *ipm_eid;
>>> HRESULT hr;
>>> SizedSPropTagArray(1,columns)={1,{PR_IPM_SUBTREE_ENTRYID}};
>>> 2. OpenEntry
>>> ULONG pcount;
>>> LPSPropValue lpsprop=NULL;
>>> hr=msg_store->GetProps((SPropTagArray*)&columns,0,&pcount,ipm_eid);
>>> ULONG ipmroottype;
>>> hr=msg_store->OpenEntry(ipm_eid->Value.bin.cb,(ENTRYID*)ipm_eid->Value.bin.lpb,NULL,0,&ipmroottype,(IUnknown**)&ipmroot);
>>> 3. Iterate Through the folders.IMAPITable *hierarchy;const GUID
>>> local_IID_IMAPITable
>>> ={0x00020301,0,0,{0xc0,0,0,0,0,0,0,0x46}};hr=ipmroot->OpenProperty(PR_CONTAINER_HIERARCHY,&local_IID_IMAPITable,0,0,(IUnknown**)&hierarchy);//ipmroot
>>> is
>>> MAPIFOLDERSizedSPropTagArray(3,cols)={3,{PR_ENTRYID,PR_DISPLAY_NAME,PR_SUBFOLDERS}};SRowSet
>>> *srows;hr=HrQueryAllRows(hierarchy,(SPropTagArray
>>> *)&cols,NULL,NULL,0,&srows);hierarchy->Release();Then i am looping
>>> through the srows to get all the standard folderBUT HOW TO ACCESS FILES
>>> ?I am confusedThank You
>>>
>>
>>
>
>
date: Thu, 20 Mar 2008 09:54:42 -0700
author: Dmitry Streblechenko
|
|