1

I am currently working on an application that can extract items from PST files and save it to a specified location. Right now I am using provided Microsoft.Office.Outlook.Interop to do this.

Here is some code that I use to save a contact Item. The code is similar for all the items that I am using.

Dim objitem As Object
If TypeOf objItem Is Outlook.ContactItem Then
            'Get out contacts
            ContactItem = CType(objItem, Outlook.ContactItem)
            strSaveName = (ContactItem.FullName.ToString) & ".vcf"
            ContactItem.SaveAs(strFolderPath & "\" & (strSaveName), Outlook.OlSaveAsType.olVCard)
        End If

However when I try to save the item using the SaveAs() method, the security prompt will popup asking me to allow the application to use Outlook for a certain period of time. (1,5,10 min) if I am not wrong. I understand that Outlook redemption can bypass this. How should I do it?

Regards,

Adeeb

0 Answers0