Quantcast
Viewing all articles
Browse latest Browse all 3821

How can Enterprise Vault be searched with an Outlook COM object?

Oui, j'ai besoin d'une solution

I can programatically search through my Outlook folder for my automation work, but most of my emails are archived in Enterprise Vault and I'm looking for a way to programatically search them in the same [type of] way please.

The nearest I have got is just to find results from the archive summary left in Sent Items but I'd like to search in the archived original and (hopefully) have a way to programmatically extract (save) the item I'm after.

 Any help/ideas please?

  $oOutlook = ObjCreate("Outlook.Application");Start the Outlook COM object
  $NameSpace = $oOutlook.GetNameSpace("MAPI")
  ;  $FolderID selection from:
  ;   1  = Appointment items
  ;   3  = Deleted items
  ;   4  = Outbox
  ;   5  = Sent Items
  ;   6  = Inbox
  ;   9  = Calendar
  ;   10 = Contacts
  ;   11 = Journal
  ;   12 = Notes
  ;   13 = Tasks
  ;   16 = Drafts
  ;   18 = All Public Folders
  ;    19 = Folder Conflicts
  ;                       20 = Folder Sync Issues
  ;                       21 = Local Failures
  ;    22 = Server Failures
  ;   23 = Junk
  Local $FolderID = 5 ;Sent Items
  Local $Folder = $NameSpace.GetDefaultFolder($FolderID)
  Local $FolderItems = $Folder.Items
  Local $NumberOfItems = $FolderItems.Count
  For $Pos = 1 To $NumberOfItems Step 1
     $message = $FolderItems.Item($Pos)
     If StringInStr($message.Body, "Hello World") Then
        MsgBox(0, "Found Email", $Message.Subject & " - Sent on "& $Message.SentOn & " - "& $SentFormatDate & " - "& $SentDate)
     Endif
  Next


Viewing all articles
Browse latest Browse all 3821

Trending Articles