Selasa, 05 Juli 2011

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

 


Alright Mike, I stand corrected, it eventually gets out of the loop but
then, right out of the loop, it encounters the following:
If Not intIndx2 > 0 Then GoTo Exit_cmdScan_Click
and it exits the sub without ever running the
GetEmailSpecificsFromOutlook sub.

"it fails the IF check for a mail item and doesn't email anything."
Which one is the IF check you mean?
Giorgio

--- In AccessDevelopers@yahoogroups.com, Mike Wolfstone
<mikewolfstone@...> wrote:
>
> There is no endless loop problem. I just can't get the code to
forward the
> email Item I have identified and selected.
>
>
>
>
> ________________________________
> From: Toby Bierly toby@...
> To: AccessDevelopers@yahoogroups.com
> Sent: Sun, July 3, 2011 7:27:23 PM
> Subject: 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@...]
> >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.
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar