Hi there, I want to fetch the message from my PST file as it is ordered and displayed in Outlook Express or Office Outlook. If i sort by name or date or sender or whatever then i would require to fetch the message in the same order from that PST? Can this me done if yes how? Thank You miztaken
How to know in which order is the folder sorted so that i can fetch the Message supplying the same input? I can see HRESULT HrQueryAllRows( LPMAPITABLE ptable, LPSPropTagArray ptaga, LPSRestriction pres, LPSSortOrderSet psos, LONG crowsMax, LPSRowSet FAR * pprows ); accepts LPSSortOrderSet cant we use this ... if yes how can we do that.. pls help me miztaken
You can't, at least not from IMAPITable. The sort order is stored in the folder view descriptor. The format is undocumented of course. -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "miztaken" wrote in message news:6e38246f-3d99-4d49-b7b7-a6ffe7fbd9fd@w1g2000prk.googlegroups.com... > How to know in which order is the folder sorted so that i can fetch > the Message supplying the same input? > > I can see HRESULT HrQueryAllRows( > LPMAPITABLE ptable, LPSPropTagArray ptaga, LPSRestriction pres, > LPSSortOrderSet psos, LONG crowsMax, LPSRowSet FAR * pprows ); > > accepts LPSSortOrderSet > cant we use this ... > if yes how can we do that.. > > pls help me > > miztaken
> You can't, at least not from IMAPITable. > The sort order is stored in the folder view descriptor. The format is > undocumented of course. So that means we cant sort or know the sort order of any Folder (Outlook). Is there any workaround? Thanks miztaken
No, when Outlook displays a folder, it uses a private instance of IMAPITable retrieved from IMAPIFolder::GetContentsTable. How that table is sorted is known only to Outlook. Why is this important? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "miztaken" wrote in message news:bd9ed493-beff-49c7-a21e-89ed9368aa63@t54g2000hsg.googlegroups.com... >> You can't, at least not from IMAPITable. >> The sort order is stored in the folder view descriptor. The format is >> undocumented of course. > > So that means we cant sort or know the sort order of any Folder > (Outlook). > Is there any workaround? > > Thanks > miztaken >
> No, when Outlook displays a folder, it uses a private instance of IMAPITable > retrieved from IMAPIFolder::GetContentsTable. > How that table is sorted is known only to Outlook. > Why is this important? Hi, Just wanted to fetch the Message from PST in the way it is ordered as seen in Outlook. Just for consistency when viewed and fetched miztaken
Do you mean the selected message(s)? Have you looked at the Applicationb.ActiveExplorer.Selection collection in the Outlook Object Model? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "miztaken" wrote in message news:40241116-dffb-4bb1-bbac-d66b97e965e8@w1g2000prk.googlegroups.com... >> No, when Outlook displays a folder, it uses a private instance of >> IMAPITable >> retrieved from IMAPIFolder::GetContentsTable. >> How that table is sorted is known only to Outlook. >> Why is this important? > > Hi, > Just wanted to fetch the Message from PST in the way it is ordered as > seen in Outlook. > Just for consistency when viewed and fetched > > miztaken >
On Aug 21, 10:35 pm, "Dmitry Streblechenko" wrote: > Do you mean the selected message(s)? Have you looked at the > Applicationb.ActiveExplorer.Selection collection in the Outlook Object > Model? No i dont mean the selected messages. User opens PST in Outlook, check the messages.. sorts them by sender or date or subject or attachment then close the PST. Now when my application reads same PST then i would love to preserve its view state..i.e. order in which the user customized last time? Is this possible? miztaken
Only by hacking the format of the view descriptor in thaat folder. -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "miztaken" wrote in message news:40225a75-509e-4f24-9026-0ed35eb44d16@j1g2000prb.googlegroups.com... On Aug 21, 10:35 pm, "Dmitry Streblechenko" wrote: > Do you mean the selected message(s)? Have you looked at the > Applicationb.ActiveExplorer.Selection collection in the Outlook Object > Model? No i dont mean the selected messages. User opens PST in Outlook, check the messages.. sorts them by sender or date or subject or attachment then close the PST. Now when my application reads same PST then i would love to preserve its view state..i.e. order in which the user customized last time? Is this possible? miztaken