I
Iwi
I am using CreateItemFromTemplate, and the template being a *.msg of a
mail from inbox. Problem: The new item will have draft as parent
folder. I want to save the newly created item back to inbox. So I save
the item on drafts and move it to inbox. Problem is that the newly
created item's parent property is still drafts (and you can even see
that the item's icon is different than any other items in inbox, and I
find no way to change this property since it is a read-only.
here's my program:
Set ol = New Outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set oFolder = olns.GetDefaultFolder(olFolderInbox)
Set oMail = oFolder.Items.GetLast()
oMail.SaveAs "C:\OutlookTest.MSG"
Set oNewItem = ol.CreateItemFromTemplate("C:\OutlookTest.MSG",
oFolder)
Set oNewItem2 = oNewItem.Copy
Set oNewItem = Nothing
''oNewItem.Move oFolder
oNewItem2.Move oFolder
ViewMailProperties (oMail)
ViewMailProperties2 (oNewItem)
Anybody knows ways to do this so that I can get the parent property as
my desired folder? Thank you.
mail from inbox. Problem: The new item will have draft as parent
folder. I want to save the newly created item back to inbox. So I save
the item on drafts and move it to inbox. Problem is that the newly
created item's parent property is still drafts (and you can even see
that the item's icon is different than any other items in inbox, and I
find no way to change this property since it is a read-only.
here's my program:
Set ol = New Outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set oFolder = olns.GetDefaultFolder(olFolderInbox)
Set oMail = oFolder.Items.GetLast()
oMail.SaveAs "C:\OutlookTest.MSG"
Set oNewItem = ol.CreateItemFromTemplate("C:\OutlookTest.MSG",
oFolder)
Set oNewItem2 = oNewItem.Copy
Set oNewItem = Nothing
''oNewItem.Move oFolder
oNewItem2.Move oFolder
ViewMailProperties (oMail)
ViewMailProperties2 (oNewItem)
Anybody knows ways to do this so that I can get the parent property as
my desired folder? Thank you.