NotesDocument->Remove(), then dies

Posted on 2004-11-04
Last Modified: 2013-12-18
Sorry - this is in perl.  I don't know vb.

I spinning thru the documents in my inbox.  I've cut out all but the
problem, which is, I remove an unwanted document and the
program dies.  Can you delete a document within an enumeration?
If not, how?  Tag it?  I'll build an array of documents to delete.  Great, if
it works, but still curious about this attempt to delete/remove here.

New to notes.  Any suggestions helpful.


while ($MDoc=$mailvw->GetNextDocument($MDoc)) {

# ------------------------------------------------------------------------
sub getDoc {
  my $doc = shift;

Question by:hank1
    1 Comment
    LVL 15

    Accepted Solution

    Problem is you delete $MDoc, and then want to use in to Getnextdocument.

    You can solve this by already fetching the next document BEFORE you delete the current document.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
    Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now