Hello Marcia, Garrett, and Gary
Well, I never fell into the no '=' sign trap, but thanks for the heads up. I also predicate every '=mymethod()' with a local as well. Generally, I find it good form to do so in that I can create an error trap for each mehtod in doing so. Even if a method does not have a return value (which I believe makes it an event), doesn't it by default return a .T. if it happend, or a .F. if it didn't?? This is not the whole code, but a snippet on some stuff so you get the idea....
ForEx:
LPARAMETER _activeobjectname
LOCAL loForm, llError
IF EMPTY(_activeobjectname)
RETURN .F.
ENDIF
llError = _activeobjectname.destroy()
IF !llError
ENDIF
I hope I am not way wrong on this, because it works... lol...
Ric
(PS - no K in 'RIC', as in no 'K' in Richard... :-))
>Hi Rick.
>
>
I am wondering if anyone has found a method via outlook automation to move a message from the inbox to another folder?? If so, could you please let me know... pulling my hair on this one...>
>In addition to the advice you have already received about how the Message Indexes change as you move them, Keep in mind that you have to strore the result of the Move() to a variable. Otherwise Outlook (at least OL2K will) will give you back an OLE error telling you that the "Parameter is not optional".
>
>So, code like this will work:
>
>
>oInBox = oNameSpace.GetDefaultFolder( 6 )
>*** This will work if you have a folder called YadaYada
>oOtherFolder = oNameSpace.Folders( 1 ).Folders( "YadaYada" )
>oMsg = oInBox.Items( 1 )
>oCrap = oMsg.Move( oOtherFolder )
>
>
>However, this syntax will give you the ole error:
>
>oMsg.Move( oOtherFolder )
>
>The point being that you must have oCrap for this to work (as I said before, at least in OL2K which is where I tested this)
>
>HTH