Re: Automating saving encrypted attachments in Outlook 2000 using VB

From: Sue Mosher [MVP-Outlook] (suemvp_at_outlookcode.com)
Date: 05/21/04


Date: Fri, 21 May 2004 07:58:39 -0400

Outlook provides no programmatic way to access encrypted information. You
can determine what type of item you're working with by declaring olMi as
Object, not MailItem, and checking its Class property.

-- 
Sue Mosher, Outlook MVP
Author of
     Microsoft Outlook Programming - Jumpstart for
     Administrators, Power Users, and Developers
     http://www.outlookcode.com/jumpstart.aspx
"j" <j_mcmullin76@hotmail.com> wrote in message
news:1603d3ce.0405210124.4bd3cbdd@posting.google.com...
> Hi,
> After having a look around on various groups I found lots of code to
> automate the saving of attachments on mails to folders on the file
> system. This was the primary requirement of a client of mine. However,
> they have now come back to me to say that the format of the mails will
> be changing to SMIME encrypted emails. They are using Outlook 2000 and
> have got personal certificates from Thawte and now have an automated
> system emailing them mails that are encrypted using these
> certificates. I'm trying to work out if I'll be able to access the
> attachments if they are encrypted. I've got a personal cert myself now
> and I'm coming up against some problems in my code (abridged version
> below)
>
> For I = Fldr.Items.Count To 1 Step -1
> Set olMi = Fldr.Items(I)
>   For Each olAtt In olMi.Attachments
>     On Error Resume Next
>     olAtt.SaveAsFile (strPath & olAtt.filename)
>   Next olAtt
>   olMi.Save
>   olMi.Move MoveToFldr
> Next I
>
> I'm getting an error on the line of "Set olMi = Fldr.Items(I)"
> Run-time error '13':
> Type Mismatch
>
> This error doesn't happen when the mail is an unencrypted mail. Does
> this mean that encrypted mails are not Outlook.MailItem objects or
> what???
> Does anyone know whether even if I can get the type right, will I be
> able to save the attachment? Normally when I open the mail I get
> prompted for a password (this was associated with the cert when I went
> through the cert generation process on Thawte.com). How will I be able
> to automate this process so that it is invisible to the user?
>
> Any help, ideas, references would be greatly appreciated.
>
> Regards,
> Jeremy


Relevant Pages

  • Re: Exchange Intelligent Message Filter / CRM
    ... laut MS Doku verschiebt auf STORE Ebene nur der Client die Mails die dem ... If a user is using Outlook 2003 or Outlook Web Access with Exchange 2003, ... the user's mailbox store compares the message's SCL rating with the store ... Wert größer 5 automatisch vom Server in den Junk Ordner ...
    (microsoft.public.de.german.exchange2000.general)
  • RE: exchange emails not delivering to all pcs
    ... If the mails ... Exchange mailbox; if the mails reach your Exchange mailbox and redirected ... to a PST file in one Outlook, ... user account receive email on the two workstation. ...
    (microsoft.public.windows.server.sbs)
  • Re: Outlook Express geht nicht mehr, emails verschwunden
    ... OUTLOOK WÄR MIR IM MOMENT EGAL, ... DIESE MAILS WIEDER ZU BEKOMMEN. ... ABER DIE ORDNER REAGIEREN NICHT; ... EIN FEHLER IST AUFGETRETEN. ...
    (microsoft.public.de.german.inetexplorer.ie6.outlookexpress)
  • Re: Microsoft Exchange Server steht zur Zeit nicht zur Verfügung
    ... D.h. Deine Maschine ist kein Mitglied einer Microsoft Domäne. ... Oder wie kamen die Daten auf die neue Festplatte, ... Outlook XP gestartet und dem Wizard gefolgt. ... Dazu hast Du vermutlich POP3 genutzt um die Mails ...
    (microsoft.public.de.exchange)
  • Re: Outlook Automation: is there a better way?
    ... while Not (olmi Is Nothing) ... OutlookSpy - Outlook, CDO ... Dim olapp As Outlook.Application ... Dim objItem As Object ...
    (microsoft.public.outlook.program_vba)