updating the subject field

  • Thread starter Thread starter JohnJJ
  • Start date Start date
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
 
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
 
Back
Top