Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help with MAPI form doverb 106

1 view
Skip to first unread message

Pijush

unread,
Dec 19, 2009, 3:43:01 PM12/19/09
to
Hi All

I would hugely appreciate if someone can help me with a lead on the issue
that I have. I am trying, using MAPI with C++, to save an email to an html
(or text) file. When I call MAPIForm::DoVerb with the verb 106 (SaveAs), it
shows a file open dialog box. My goal is to make this work without any dialog
box. I have gone through code of the excellent tool MFCMAPI and I think I
need to make the form call the viewcontext's getsavestream method. But it
seems that the form is not calling that function. Can someone please help me
with a piece of code showing implementation of SaveAs doverb for MAPIForm?

Thanking in advance
Pijush

Dmitry Streblechenko

unread,
Dec 20, 2009, 7:12:42 PM12/20/09
to

You cannot do that through DoVerb. You need to either use teh Outook Object
Model (MailItem.SaveAs) or do the exporting explicilty in your code.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Pijush" <Pij...@discussions.microsoft.com> wrote in message
news:870B346B-E348-4AE4...@microsoft.com...

Pijush

unread,
Dec 20, 2009, 8:08:01 PM12/20/09
to
Thanks Dmitry. So I have to export explicitly. Where can I get information on
the format of exported file? Which properties have to be exported for
different item types (mail, contact, calendar etc)?

Thanks
Pijush

"Dmitry Streblechenko" wrote:

> .
>

Pijush

unread,
Dec 20, 2009, 9:07:01 PM12/20/09
to
Dmitry

Also I wold like to know how IMAPIViewContext::GetSaveStream is used.

Thanks
Pijush

Dmitry Streblechenko

unread,
Dec 21, 2009, 11:50:08 AM12/21/09
to
If you are trying to export to HTML format, wouldn't the format be HTML?
You'd just read the relevnt MAPI properties and create your HTML content.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Pijush" <Pij...@discussions.microsoft.com> wrote in message

news:15EE2608-A8BB-44D4...@microsoft.com...

Pijush

unread,
Dec 21, 2009, 12:43:01 PM12/21/09
to
Sorry, I didn't clearly write what I want. I am trying to create a file that
will contain same information as the file created by outlook (file -> saveas)
for different types of items with. Is there any documentation on which
properties are used by outlook for different items?

And I am not sure how IMAPIViewContext::GetSaveStream is used.

Thanks
Pijush

"Dmitry Streblechenko" wrote:

> .
>

Dmitry Streblechenko

unread,
Dec 21, 2009, 4:35:17 PM12/21/09
to
There is no documentation. Create the file with Outlook, then create the
same output in your code.
GetSaveStream is nto really applicable to this.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Pijush" <Pij...@discussions.microsoft.com> wrote in message

news:6542C8D0-2FCE-4794...@microsoft.com...

0 new messages