View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default posting this here cuz the outlook programing group is very inactive...

On Wednesday, November 23, 2016 at 10:52:53 AM UTC-7, GS wrote:
There are attachments in every selected e-mail, but I only want to
'do stuff' when there is a PDF attachment. I was able to figure out
how to save/print the pdf via shell, but adding
categories/flagstatuses isn't happening on each e-mail.


I'm not understanding why you feel a need to update any flags! Your
code only processes PDF files and so why do you need to flag it?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Thank you for helping me with this Garry! You've been very very
helpful in the past. Not all e-mail items have a PDF attachment, and
I'm only looking to print PDF attachments. If there is no pdf
attachment, the flag would not be updated to complete thus
identifying the item for futher work to be done. If there is a PDF
attachment, I want to be able to identify it as having been printed
with the Complete checkmark. Hope that helps clarify?


Thanks for clarifying, Matthew! I don't use OE and so have no idea of
its automation specifics. Makes sense now as to why you need to flag
messages!

So you need to add an 'If..Then' check for the flag setting and only
process those not yet processed. You could simply expand your check for
the filetype...

If Right$(strFile, 3) = "pdf" And _
objMsg.FlagStatus < olFlagComplete Then

...where you need to set the value for olFlagComplete somewhere so that
your code knows what it is. (I don't see where it's defined in your
routine so I assume it's defined at module level; -otherwise it
persists as zero!)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion