Bug 103456 - VBA to export Outlook 2010 Contacts to Spreadsheet using VBA with Windows operating system and Outlook installed
Summary: VBA to export Outlook 2010 Contacts to Spreadsheet using VBA with Windows ope...
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-24 10:07 UTC by Óvári
Modified: 2018-02-18 13:02 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
2016.10.23 Outlook pst to CSV.xls (128.00 KB, application/vnd.ms-excel)
2016-10-24 10:08 UTC, Óvári
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Óvári 2016-10-24 10:07:18 UTC
Description:
Macro to export Outlook 2010 Contacts from a pst file into a spreadsheet.

Macro can be extended to export the contact picture also.

Hoped it would work without Excel, i.e. using LibreOffice Calc to open attachment entitled "2016.10.23 Outlook pst to CSV.xls".

The default Address Book in Thunderbird does not support categories; hence, the file could then export the information to a CSV file for importing into Thunderbird's CardBook add-on:
https://addons.mozilla.org/thunderbird/addon/cardbook/

This is being written on a Linux; however, it was tested on Windows 8.1 with LibreOffice 5.2

Thank you

Steps to Reproduce:
1. Open LibreOffice
2. Tools menu --> Options
3. LibreOffice --> Security
4. Macro Security...
5. Medium.
6. OK
7. OK
8. Open attachment: 2016.10.23 Outlook pst to CSV.xls
9. Enable Macros
10. Yes
11. Error appears

Actual Results:  
Error as described in 'Steps to Reproduce'.

Expected Results:
Outlook tab in spreadsheet to be populated with Contacts based on Settings tab.


Reproducible: Always

User Profile Reset: No

Additional Info:
This can help with migrating from Outlook to Thunderbird.

Please advise if you require any additional information.

Thank you


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Comment 1 Óvári 2016-10-24 10:08:06 UTC
Created attachment 128201 [details]
2016.10.23 Outlook pst to CSV.xls
Comment 2 Justin L 2017-05-12 15:06:19 UTC
I'd think it is extremely safe to say that we will never support this.  The macro is obviously extremely tied to Microsoft's internal Outlook API.

'Variables for importing data from Outlook
Dim olApp As New Outlook.Application
Dim olNS As Outlook.NameSpace
Dim olPST As Outlook.MAPIFolder
Dim olFolder As Outlook.MAPIFolder
Dim olItems As Outlook.Items

'------------------------
'Import data from Outlook
'------------------------

    Set olNS = olApp.GetNamespace("MAPI")
    
 ...