Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: moving emails between folders with Win32::OLE

by RayRay459 (Pilgrim)
on May 14, 2002 at 15:36 UTC ( [id://166465]=note: print w/replies, xml ) Need Help??


in reply to Re: moving emails between folders with Win32::OLE
in thread moving emails between folders with Win32::OLE

Thanks for the advice. Very Much appreciated. I attempted to use this line and got an error:
$item->MoveTo($Folder5);
C:\scripts\perl\email>getsearchemail.pl Attributes caty3 Update ok SEARCH: roadster active-desc2 Indexing Results ok Win32::OLE(0.1501) error 0x80020006: "Unknown name" in GetIDsOfNames of "MoveTo" at C:\scripts\perl\email\getSearchEm +ail.pl lin e 28
Did i understand what you said correctly?

Replies are listed 'Best First'.
Re: Re: Re: moving emails between folders with Win32::OLE
by strat (Canon) on May 14, 2002 at 15:52 UTC
    Sorry, was my error. MoveTo requires the FolderID or StoreID as String. http://msdn.microsoft.com/ -> search for CDO and MoveTo says about the following:
    $item->MoveTo( $Folder5->{FolderID} );
    or:
    $item->MoveTo( $Folder5->{StoreID} );

    Best regards,
    perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"

      I'm having a problem identifying the store id.. I found this link : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_olemsg_moveto_method_folder_object_.asp and even with this :
      $item->{MoveTo}( $Folder5 ); i get this error Win32::OLE(0.1501) error 0x8002000e: "Invalid number of parameters" in METHOD/PROPERTYGET "MoveTo" at C:\scripts\perl\email\getSearchE +mail.pl li ne 27 with this line: $item->MoveTo( $Folder5); i get Win32::OLE(0.1501) error 0x80020006: "Unknown name" in GetIDsOfNames of "MoveTo" at C:\scripts\perl\email\getSearchEm +ail.pl lin e 27
      still can't seem to find the right line to make the current item in my loop move to another folder. Anything else i can try? Thnx, Ray
      I'm having trouble figuring out what the storeid is. i looked at the page http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_olemsg_folder_object.asp
      and i can't seem to get a grip on how that would work in my code. I must be missing something in this line that makes it think that it doesn't have the right number of parameters. i'm getting errors that say :
      Win32::OLE(0.1501) error 0x8002000e: "Invalid number of parameters" in METHOD/PROPERTYGET "MoveTo" at C:\scripts\perl\email\getSearchE +mail.pl li ne 27
      with the line :
      $item->{MoveTo}( $Folder5 );
      <banging head against my desk> i wish i could make this work. Can anyone help? Thanks again Strat for your postings. I do appreciate your help. Ray
        Perhaps not the fastest reply but since I had the same problem and searching I ended up on this node...
        I got it working with;
        $item->Move($Folder5);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://166465]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-18 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found