Reply saved message

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.
 
K

Ken Slovak - [MVP - Outlook]

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.
 
K

Ken Slovak - [MVP - Outlook]

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.
 
S

Sue Mosher [MVP-Outlook]

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.
 
S

Sue Mosher [MVP-Outlook]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top