Reply saved message

  • Thread starter Thread starter Misha
  • Start date Start date
M

Misha

I want to reply previously saved message.
I open a message from *.msg file using
obj = CreateItemFromTemplate(Filename);
obj.Display;

There is no reply button available when the message pops up.

I try to generate reply message using
obj = CreateItemFromTemplate(Filename);
repl = obj.Reply;
repl.Display;

But this line repl = obj.Reply;
generates error message "Could not send the message"

What am I doing wrong?

Thank you,
Misha.
 
When you create a message that way it's created as a new message. That's why
you have a Send button but no Reply, ReplyAll or Forward buttons.
CreateItemFromTemplate() always creates a new item.
 
Not using the Outlook object model. CreateItemFromTemplate works with msg
files but primarily is used wit oft custom form templates. It always creates
the item as a new (unsent) item. There really isn't anything else that does
what you want.

The 3rd party Redemption library (www.dimastr.com/redemption) provides
GetMessageFromMsgFile() methods that allow opening a saved item, among many
other things. You can also do it using Extended MAPI (not supported for
managed code, and C++ or Delphi only), just not with the Outlook object
model.
 
You don't have Outlook 2007, do you?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


Misha said:
Is there any way to replay previously saved message?

Ken Slovak - said:
When you create a message that way it's created as a new message. That's why
you have a Send button but no Reply, ReplyAll or Forward buttons.
CreateItemFromTemplate() always creates a new item.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


Misha said:
I want to reply previously saved message.
I open a message from *.msg file using
obj = CreateItemFromTemplate(Filename);
obj.Display;

There is no reply button available when the message pops up.

I try to generate reply message using
obj = CreateItemFromTemplate(Filename);
repl = obj.Reply;
repl.Display;

But this line repl = obj.Reply;
generates error message "Could not send the message"

What am I doing wrong?

Thank you,
Misha.
 
Since you have Outlook 2007, you can import the .msg file using the Namespace.OpenSharedItem method. The resulting item should have its original sender information intact, so you can reply to it.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
Back
Top