Modifying a subject in a WordMail message

M

Mark Wilson

I'm developing a Word COM Addin in C++ and I need to be able to read and
write the message subject. I'm testing with Office 2003 and when I execute
the code below I get a return value of E_NOTIMPL on the call to "Mailer"

//--------------------------------------------
HRESULT hr;
LPDISPATCH pDoc;
VARIANT vtMailer; VariantInit(&vtMailer);
VARIANT vtSubject; VariantInit(&vtSubject);

hr = GetProperty(pDoc, L"Mailer", &vtMailer);
if (!FAILED(hr))
hr = GetProperty(vtMailer.pdispVal, L"Subject", &vtSubject);
//--------------------------------------------

What is the preferred method of modifying a message subject from a Word COM
Addin?
 

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