Minggu, 03 Juli 2011

Re: [AccessDevelopers] Re: Finding outlook email items and selectively forwarding them

 

I haven't tried test running the code or debugging to watch the values, but in regards to the endless loop, it looks like intitem variable is incremented inside the loop, so I was curious how that could result in an endless loop.  At some point it would have to get larger than intIndx, right?

Thanks,
Toby


From: GiorgioR [mailto:giorgio_rovelli@virgilio.it]
To: AccessDevelopers@yahoogroups.com
Sent: Sun, 03 Jul 2011 16:38:15 -0700
Subject: [AccessDevelopers] Re: Finding outlook email items and selectively forwarding them

 

Mike, I don't know if you're using the Public Sub GetContactDetailsFromContactList but this to me seems wrong:
Distribution Items(AddressLists)
What's Distribution? And AddressLists is an undefined variable.
I think you meant to type
Set objItems = olContactFolder.Items(AddressLists)
instead

and also
    While intitem < intIndx
        If Not Len(arrItems(intitem, 0)) > 0 Then GoTo SkipAdd
        If Left(arrItems(intitem, 0), 23) = "Undeliverable: Invoice " Or _
            Left(arrItems(intitem, 0), 15) = "failure notice " Then
                arrIndx(intIndx2) = intitem
                intIndx2 = intIndx2 + 1
                List2.AddItem (arrItems(intitem, 0) & ";" & Right(arrItems(intitem, 1), 40) & ";" & arrItems(intitem, 2))
        End If
SkipAdd:
    intitem = intitem + 1
    Wend
in Private Sub cmdScan_Click()
goes into an endless loop.
Giorgio

--- In AccessDevelopers@yahoogroups.com, Mike Wolfstone <mikewolfstone@...> wrote:
>
> With the current code,  it fails the IF check for a mail item and doesn't email
> anything.
> If I comment out the IF -> Endif,  it fails on a type mismatch at
> 'set objitem = objitem2'
> I've read the documentation (outlook VBA) and gotten samples from here and other
> sites,
> but no matter how I manipulate the code (the lines commented out are things I
> have tried), 
>
> I can't quite get Outlook to recognize the item I have selected and forward it.
> Anything you might suggest would be welcomed.
> Mike
>
>
>
>
> ________________________________
> From: GiorgioR giorgio_rovelli@...
> To: AccessDevelopers@yahoogroups.com
> Sent: Fri, July 1, 2011 12:39:48 AM
> Subject: [AccessDevelopers] Re: Finding outlook email items and selectively
> forwarding them
>
>  
> Mike,
> I suppose you mean the Private Sub cmdScan_Click() in frmTest calls the
> GetEmailSpecificsFromOutlook sub but I see it run to completion, where's the
> problem?
> Giorgio
>
> --- In AccessDevelopers@yahoogroups.com, Mike Wolfstone mikewolfstone@
> wrote:
> >
> > Giorgio,
> > The code to email forward is in the .bas moduule.
> > The code is not complete.  I build my automation apps so I can test them along
> >
> > the way and then clean out the chaff.
> > The Scan (sub) logic calls the .bas module and that's where I have the
> problem.
> > Mike
> >
> >
> >
> >
> > ________________________________
> > From: GiorgioR giorgio_rovelli@
> > To: AccessDevelopers@yahoogroups.com
> > Sent: Thu, June 30, 2011 6:00:32 AM
> > Subject: [AccessDevelopers] Re: Finding outlook email items and selectively
> > forwarding them
> >
> >  
> > Hi Mike, have you written the code to send the chosen item anywhere in the VBA
>
> > code or do you need that?
> > Giorgio
> >
> > --- In AccessDevelopers@yahoogroups.com, "mikewolfstone" <mikewolfstone@>
> > wrote:
> > >
> > > I uploaded the file. It is named FindTeamCust.mdb with a tag of
> > >ForwardEmailSelectively.
> > > Thanks for any help you can provide.
> > >
> > > --- In AccessDevelopers@yahoogroups.com, "giorgio_rovelli" <giorgio_rovelli@>
> >
> > >wrote:
> > > >
> > > > Hi, can you upload the mdb/accdb to the Files section?
> > > >
> > > > --- In AccessDevelopers@yahoogroups.com, "mikewolfstone" <mikewolfstone@>
> > >wrote:
> > > > >
> > > > > I have an Access program that reads the outlook inbox and extracts
> >certain
> >
> > >data (subject, objectID, received date) and builds a list of those items. It
> > >then selects specific conditions in the subject and further selects those for
>
> > >email forwarding. I can get to that point and identify the item to forward,
> >but
> >
> > >the Outlook API doesn't fit the documentation. I need to send (forward) an
> >inbox
> >
> > >item to a new email address. Any thoughts?
> > > > > The error I get on the activeinspector.currentitem.forward statement is
> > >"Method is not supported by the object"
> > > > >
> > > >
> > >
> >
>

__._,_.___
Recent Activity:

Please zip all files prior to uploading to Files section.
.

__,_._,___

Tidak ada komentar:

Posting Komentar