Hi all,
Has anyone worked with the outlook.mailitem.move to a (nested)outlookfolder COM interface?
I can enumerate all the folders, traverse through them, so basic functioning an COM calls are valid and working, but when I
try to compile using a outlookmapifolder as destination for mailitem.move, it(compile) errors with: Data type mismatch
This is the declare in outlook.inc
[source]
INTERFACE DISPATCH OutlookMailItem
MEMBER CALL Move<&H0000F034>(IN DestFldr AS OutlookMAPIFolder<&H00000000>) AS VARIANT
Example:
LOCAL voutpfolder AS DISPATCH
or LOCAL voutpfolder AS outlookmapifolder
SET voutpfolder = oOl_folder 'oOl_folder is valid because i can request a oOl_folder.getname() to vVar
and then the move command:
OBJECT CALL ool_Curitem.Move(vofolder) TO voutpfolder
GIVES: Compile error: data type mismatch
When I use a variant inputfolder, it compiless, but then it errors with a com error "No valid type" &h0008006.
Example
LOCAL voutpfolder AS variant
SET voutpfolder= oOl_folder 'oOl_folder is valid because i can request a oOl_folder.getname() to vVar
I get the run error "No valid type" &h0008006 as com error. (in Dutch 'Typen komen niet overeen'
Now the thing is, I cant use PBwin9, because PB is not supporting mailitem.SenderEmailAddress anymore in 9.x version, and its a major important function in this application.
So it has to work in PBwin8.
Anyone that can give a hint or has source how to solve this?
Thnx in advance.
Herman.
Has anyone worked with the outlook.mailitem.move to a (nested)outlookfolder COM interface?
I can enumerate all the folders, traverse through them, so basic functioning an COM calls are valid and working, but when I
try to compile using a outlookmapifolder as destination for mailitem.move, it(compile) errors with: Data type mismatch
This is the declare in outlook.inc
[source]
INTERFACE DISPATCH OutlookMailItem
MEMBER CALL Move<&H0000F034>(IN DestFldr AS OutlookMAPIFolder<&H00000000>) AS VARIANT
Example:
LOCAL voutpfolder AS DISPATCH
or LOCAL voutpfolder AS outlookmapifolder
SET voutpfolder = oOl_folder 'oOl_folder is valid because i can request a oOl_folder.getname() to vVar
and then the move command:
OBJECT CALL ool_Curitem.Move(vofolder) TO voutpfolder
GIVES: Compile error: data type mismatch
When I use a variant inputfolder, it compiless, but then it errors with a com error "No valid type" &h0008006.
Example
LOCAL voutpfolder AS variant
SET voutpfolder= oOl_folder 'oOl_folder is valid because i can request a oOl_folder.getname() to vVar
I get the run error "No valid type" &h0008006 as com error. (in Dutch 'Typen komen niet overeen'
Now the thing is, I cant use PBwin9, because PB is not supporting mailitem.SenderEmailAddress anymore in 9.x version, and its a major important function in this application.
So it has to work in PBwin8.
Anyone that can give a hint or has source how to solve this?
Thnx in advance.
Herman.
Comment