updating the subject field

J

JohnJJ

For the project I am working on, I have written a macro
that places a copy of any MS Word document that a user is
working on into a relevent Outlook Public folder.

After I have identified the required Public Folder, I use
the code similar to


Set myitems = objFolder.Items
Set myItem = myitems.Add("IPM.Document.Word.Document")
Set myAttachments = myItem.Attachments
Set myAttachment = myAttachments.Add
(ActiveDocument.FullName, olByValue)
myItem.Save

It works fine, but when you see the item in the Outlook
Public folder the subject field is blank. Is there any
way I can set this field?

I have tried using
"Set myItem.Subject = ActiveDocument.Name", but I receive
the message "Invalid use of Property"

If anyone can point me in the right direction, then that
would be greatly appreciated.

Thank you

Johnjj
 
J

JohnJJ

Just solved it - drop the "Set" from
"Set myItem.Subject = ActiveDocument.Name".

Isn't that always the way?, answer a question right after
you asked it. doh!

Thanks for reading this, apologies for wasting your time.

JohnJJ
 

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