R
Robin
Public Sub movetosave()
Ok, I posted a little while ago about a rule to move mail items and I've
kind of given up on that and am trying something else. I'm trying to write
VB code to use as a macro and don't know what I'm doing. This is what I've
been able to come up with from picking through the help info and all I get
is an error message that says 'object required'. Can someone tell me what
I'm doing wrong?
thanks
Public Sub mocetosave()
Set myNameSpace = Application.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(6)
Set myitems = myInbox.Items
Set myDestFolder = myInbox.Folders("Saved Mail")
Set myitem = myitems.CurrentItem
myitem.MoveTo myDestFolder
End Sub
Ok, I posted a little while ago about a rule to move mail items and I've
kind of given up on that and am trying something else. I'm trying to write
VB code to use as a macro and don't know what I'm doing. This is what I've
been able to come up with from picking through the help info and all I get
is an error message that says 'object required'. Can someone tell me what
I'm doing wrong?
thanks
Public Sub mocetosave()
Set myNameSpace = Application.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(6)
Set myitems = myInbox.Items
Set myDestFolder = myInbox.Folders("Saved Mail")
Set myitem = myitems.CurrentItem
myitem.MoveTo myDestFolder
End Sub