Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bad Help Needed!!
Message
From
13/05/2002 04:11:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Bad Help Needed!!
Miscellaneous
Thread ID:
00655574
Message ID:
00655574
Views:
60
Hi Everyone.... time to kick the ol' cow again - OUTLOOK automation... right, I have done a lot of study on this; checked a lot of FAQ, articles, and printed heaps of threads on the subject. So, I thought I would write my own little program... and it works... except for one small thing: moving A message from the inbox to the deleted items folder; notice I said 'A' message...

So, here is what I have:
*-- A single message deleter
LPARAMETERS lnCurrentMessage, lcMessageSubject

lnReturn = -1
loInbox = THIS.oOutInbox  && The default Inbox folder - already defined
loDeletedItems = THIS.oOutDeleted  && The default Deleted Items folder - already defined
lnWork = 0
FOR EACH loMsg IN loInbox.Items
     lnWork = lnWork+1
     lcWorkSubject = THIS.GetInSubject(lnWork)
     IF lnWork = lnCurrentMessageNo .AND. LOWER(lnWorkSubject)=LOWER(lcMessageSubject)
          *-- Right, by reckoning, this should move the message I am on....
          *-- ERROR SPOT!!!! Remember this spot!!! The error occurs here!!!
          loMsg.Move( loDeletedItems )
          lnReturn = 0
          *-- Okay, remember, I only want ONE message deleted, this one... so we can go now...
          EXIT
     ENDIF
ENDFOR
*--- Do all the cleanup stuff....
*-- Return a '0' - we did good, Return -1, no message deleted
RETURN lnReturn
Right, well this is what I get at the 'ERROR SPOT'
    OLE error code 0x8002000f: Parameter Not Optional
I can only jump from a bridge from here... lol... does anyone have a clue here? I have tried to reverse the count, etc... to no avail...

TIA

Ric
Next
Reply
Map
View

Click here to load this message in the networking platform