The method MailItem.Move
has the syntax:
<MailItem>.Move(<Folder>)
The following display image shows the code I'm running, two watches, and the error they give:
When the error occurs and I click "Debug", the code comes up with yellow highlighting on the line:
oMailItem.Move (oDestFolder)
The watches show that oMailItem
is of the correct type MailItem
and oDestFolder
is of the correct type Folder
. The watch window also shows the names of those objects, indicating that they exist.
So, why the type mismatch?
Try to get rid of ()
:
oMailItem.Move oDestFolder