Issue 9160 - Some AddressBook Outlook fields not displayed
Summary: Some AddressBook Outlook fields not displayed
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.0.1
Hardware: PC Windows NT
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: wind.li
QA Contact: issues@dba
URL:
Keywords: oooqa
Depends on:
Blocks: 11373 17159
  Show dependency tree
 
Reported: 2002-11-11 17:17 UTC by john.marmion
Modified: 2008-05-16 03:30 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Sample to check what is support by IAddrBook (4.50 KB, application/octet-stream)
2003-08-21 05:00 UTC, wind.li
no flags Details
Access outlook address book through IMsgStore (6.37 KB, application/octet-stream)
2003-08-21 09:55 UTC, wind.li
no flags Details
updated,can get email address now (6.87 KB, application/octet-stream)
2003-08-22 03:27 UTC, wind.li
no flags Details
Microsoft Access mdb file,see modules/ImportOutlook/ImportContactsFromOutlook for detail (128.00 KB, application/octet-stream)
2003-08-26 10:33 UTC, wind.li
no flags Details
outlook sample with mailing list supported (7.61 KB, application/octet-stream)
2003-09-08 06:25 UTC, wind.li
no flags Details
A patch to mozilla 1.5b to make it support outlook mailing list (9.88 KB, patch)
2003-09-14 12:30 UTC, wind.li
no flags Details | Diff
A patch to mozilla 1.0 to make it import outlook mailing list (8.49 KB, patch)
2003-09-17 05:03 UTC, wind.li
no flags Details | Diff
a patch for mozilla 1.5b to make it use IMsgStore to access outlook addressbook (74.09 KB, patch)
2003-09-18 10:10 UTC, wind.li
no flags Details | Diff
Patch to get back the lose fields and support query "criterion" (114.93 KB, patch)
2003-10-29 06:57 UTC, wind.li
no flags Details | Diff
Workable binary for last patch.Tested by m645. (688.10 KB, application/octet-stream)
2003-10-29 07:20 UTC, wind.li
no flags Details
Mapping mail list as a table (5.61 KB, patch)
2003-10-30 15:27 UTC, wind.li
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description john.marmion 2002-11-11 17:17:16 UTC
There are two data integration problems between OOo and Outlook: 

1. Outlook is capable of running in Outlook Internet Local (OIL) and Outlook
Corporate/Workgroup Local (OCL) modes. When Outlook is configuerd in
Corporate/Workgroup mode, then some data does not appear in OOo. The following
fields do not display any data:

a. Nickname 
b. Home web page
c. Work web page
d. Birth Year, Birth Month, Birth Day (all set to 0)
e. Comments

2. Additional Email does not work in either mode. 

I checked the Mozilla import feature and it successfully imports nickname,
additional email, and home web page in OCL mode.
Comment 1 Frank Schönheit 2002-11-12 07:57:59 UTC
Sean, can you please have a loot at this?
Comment 2 Frank Schönheit 2003-02-26 10:37:54 UTC
Marc, can you confirm this issue (I do not have an Outlook at hand here)?
Comment 3 Frank Schönheit 2003-07-15 15:41:11 UTC
mass re-assign of address book integration issues
Comment 4 Unknown 2003-08-08 07:59:16 UTC
re-assign to wind
Comment 5 wind.li 2003-08-14 01:04:20 UTC
Yes,We lost the fields.
Comment 6 wind.li 2003-08-20 02:29:54 UTC
>I checked the Mozilla import feature and it successfully imports 
>nickname,additional email, and home web page in OCL mode.

I checked the Mozilla code and I find we use outlook addrbook in a 
different way from Mozilla import.In mapi there are two way to get 
address datas.The IMsgStore interface provides access to message 
store information and to messages and folders include address.The 
IAddrBook interface supports access to the MAPI address book.Mozilla 
import feature use IMsgStore interface and oo use other code in 
Mozilla they use IAddrBook interface to access address book.It nearly 
worked.But maybe this is a bug of microsoft,it does not support 
nickname,additional email, home web page,birthday and maybe other 
fields in OCL mode.I have write a sample to test IAddrBook.I will 
upload it late.
Comment 7 wind.li 2003-08-21 05:00:05 UTC
Created attachment 8620 [details]
Sample to check what is support by IAddrBook
Comment 8 wind.li 2003-08-21 05:23:26 UTC
about attachment (id=8620)
The code using the same way as oo to get address books from outlook .
Build addr.Open outlook,Run addr with no args.You can see nearly all
field are not supported by IAddrBook.
Run addr with arg "printall",You can see some fields are "not
supported" but can get values such as fistname,but get nickname will
cause an error.
I think this is a bug of outlook.So I think we have to move from
IAddrBook to IMsgStore.If who is familiar with MAPI,please give me advice.
Comment 9 wind.li 2003-08-21 09:55:19 UTC
Created attachment 8623 [details]
Access outlook address book through IMsgStore
Comment 10 wind.li 2003-08-22 03:27:31 UTC
Created attachment 8647 [details]
updated,can get email address now
Comment 11 wind.li 2003-08-26 10:29:11 UTC
Difference of three kinds of method to access outlook address book:
  1.IAddrBook  :
     very slow,
     can't access nickname and more other fields,
     Currently used by oo and see http://abzilla.mozdev.org/  
"Enabling Outlook and Outlook Express through the Preferences File ".
  2.IMsgStore  :
     very slow,
     can't access distributions,
     Currently used by mozilla import feature.
     Easy to transfer to.
  3.Use Microsoft Outlook Object Libary 
     very quick,
     Not implemented using tables,can't use Outlook MAPI             
        Propery name(see   
http://dba.openoffice.org/FAQ/Outlook_field_mapping.html) to    query
field value,
     harder to transfer than 2.      
    
    The 3ed method look like this:

Option Compare Database

Sub ImportContactsFromOutlook()

   ' This code is based in Microsoft Access.

   ' Set up DAO objects (uses existing "tblContacts" table)
   Dim rst As DAO.Recordset
   Set rst = CurrentDb.OpenRecordset("tblContacts")


   ' Set up Outlook objects.
   Dim ol As New Outlook.Application
   Dim olns As Outlook.Namespace
   Dim cf, cfs As Outlook.MAPIFolder
   Dim c As Outlook.ContactItem
   Dim d As Outlook.DistListItem
   Dim r As Recipient
   
   Dim objItems As Outlook.Items
   Dim Prop As Outlook.UserProperty
   Dim iNumContacts As Integer
   Dim i As Long
   
   Set olns = ol.GetNamespace("MAPI")
   For Each cfs In olns.Folders
   
   For Each cf In cfs.Folders
'        Set cf = olns.GetDefaultFolder(olFolderContacts)
    If cf.DefaultItemType = olContactItem Then
            Set objItems = cf.Items
            iNumContacts = objItems.Count
            If iNumContacts <> 0 Then
               For i = 1 To iNumContacts
                  If TypeName(objItems(i)) = "ContactItem" Then
                     Set c = objItems(i)
                     rst.AddNew
                     rst!FirstName = c.FirstName
                     rst!LastName = c.LastName
                     rst!Address = c.BusinessAddressStreet
                     rst!City = c.BusinessAddressCity
                     rst!State = c.BusinessAddressState
                     rst!Zip_Code = c.BusinessAddressPostalCode
                     ' Custom Outlook properties would look like this:
                     ' rst!AccessFieldName =
c.UserProperties("OutlookPropertyName")
                     rst.Update
                  ElseIf TypeName(objItems(i)) = "DistListItem" Then
                       Set d = objItems(i)
                       Dim j As Long
                       For j = 1 To d.MemberCount
                        Set r = d.GetMember(j)
                     rst.AddNew
                     rst!FirstName = r.Name
                     rst!Address = r.Address
                     rst.Update
                       Next
                  End If
               Next i
               rst.Close
            
            End If
        End If
    Next
    Next
    MsgBox "Finished."

End Sub

To save time I use vb for this example,can transfer to c++ if needed.
Comment 12 wind.li 2003-08-26 10:33:20 UTC
Created attachment 8774 [details]
Microsoft Access mdb file,see modules/ImportOutlook/ImportContactsFromOutlook for detail
Comment 13 Frank Schönheit 2003-09-03 15:31:31 UTC
Wind, to me this sounds as if 3. would be the most work to implement,
but perhaps also the safest.

If I understand you right, you suggest that 1. is bad because the
implementation from MS may be buggy.

About 2.: What does
> can't access distributions,
mean? What would we actually *lose* when we move to 2.?
Comment 14 Frank Schönheit 2003-09-03 15:32:21 UTC
forgot to add: I am not really eager to invest too much effort into
3., if we can get nearly the same, with no or less loss of
functionality, with 2.
Comment 15 wind.li 2003-09-04 05:15:39 UTC
We currently use 1st method.But we miss some fields and we can't
really import outlook mailing list,but the method itself support
mailing list.
If we use 2ed method,we get back the missing fields,but it does not
support mailing list(nameed "Distribution" by outlook).
If we use 3st method,users must have outlook installed in his
machine.And maybe the bigest issue is that when useed with
OfficeXp,every time we access address outlook will popup a window to
ask if an access to address is allowed.I think it is used to prevent
viruses from sending junks.

So it is hard to decide.
Comment 16 Frank Schönheit 2003-09-04 07:55:28 UTC
The window popping up with the 3rd method disqualifies it - this is
not acceptable.
The missing mailing lists may not be a problem for OOo, but for
Mozilla. In OOo, we "flatten" the address data, and we cannot display
mailing lists in OOo, anyway.
But for Mozilla, for the life access to an Outlook AB from within
Mozilla, the missing support for mailing lists may be a problem.

Does this mean that the import, since it uses 2., does *not* import
mailing lists, too?
Comment 17 wind.li 2003-09-04 09:29:01 UTC
>Does this mean that the import, since it uses 2., does *not* import
mailing lists, too?
No,it does *not*.At less my Mozilla does not reealy import mailing
lists.It only import the name of mailing lists,and make a empty
mailing list in mozilla address.
>and we cannot display mailing lists in OOo
It is not a problem,we can convert it to a folder.


Comment 18 Frank Schönheit 2003-09-04 11:05:27 UTC
>> and we cannot display mailing lists in OOo
> It is not a problem,we can convert it to a folder.

Hmm? What kind of folder? I mean, when we access the Outlook addresses
as database-like table with our SDBC driver, then we only have the
concept of "one row = one address". I don't see how we can map mailing
lists in this concept?
Comment 19 wind.li 2003-09-05 04:26:22 UTC
>What kind of folder?
I mean we can treat it as a folder( a sdbc table),such as "OP
Contacts",etc.We may lose the mailing list *itself*.But will get back
the mailing lists in it.
Comment 20 Frank Schönheit 2003-09-05 09:43:52 UTC
ah! Interesting idea, this would would indeed be nice ...

Anyway, for the original problem we have here:
As I see it, we can either have all fields, but no mailing lists, *or*
we can have mailing lists, but not all fields. So which one is worse? :(

Is there a chance to deteremine why accessing the mailing list via 2.
fails? Perhaps something needs to be done differently that the current
import in Mozilla does?
Comment 21 wind.li 2003-09-08 04:27:08 UTC
>Is there a chance to deteremine why accessing the mailing list via
2.fails?
Microsoft does not give us an interface to access mailing list.Maybe
Microsoft give one but I cann't find it.
Comment 22 wind.li 2003-09-08 06:16:04 UTC
I take back what I had said.I just find a way to access mailing list
using IMsgStore.It use IMailUser,a none documented name id 0x8054.Now
there is no problem.I plan to :
1.Add mailing list to mozilla import.
2.Rewrite nsMapiAddressBook using MAPI IMsgStore.
3.Modify connectivety/mozab driver to make it treat outlook mailing
list as a table.I think this will effect on all mozilla mailing
list,so I suggest weather we need file a new issuse on it?
Comment 23 wind.li 2003-09-08 06:25:24 UTC
Created attachment 9078 [details]
outlook sample with mailing list supported
Comment 24 Frank Schönheit 2003-09-08 08:55:41 UTC
Wind, this is *great*!

I agree to creating a separate issue for the third item (mapping
mailing lists to tables), just to keep things clearly separated.
I also suggest filing an issue for 1. in BugZilla, and make the
changes independent on 2., so you can submit/commit them to Mozilla
independently.
Comment 25 wind.li 2003-09-08 09:35:59 UTC
There already have many bugs about mailing list problem in
Bugzilla.mozilla.com.
This is one:
  http://bugzilla.mozilla.org/show_bug.cgi?id=149961.
Comment 26 Frank Schönheit 2003-09-08 10:01:04 UTC
okay, this one fits perfectly :), thanks
Comment 27 wind.li 2003-09-14 12:30:20 UTC
Created attachment 9296 [details]
A patch to mozilla 1.5b to make it support outlook mailing list
Comment 28 wind.li 2003-09-17 05:03:14 UTC
Created attachment 9393 [details]
A patch to mozilla 1.0 to make it import outlook mailing list
Comment 29 wind.li 2003-09-18 10:10:24 UTC
Created attachment 9444 [details]
a patch for mozilla 1.5b to make it use IMsgStore to access outlook addressbook
Comment 30 wind.li 2003-09-22 04:55:03 UTC
mozilla need another patch.
When get birthday,we must convert UTC time to local time.

FILETIME   localTime ;
FileTimeToLocalFileTime(&values->Value.ft,&localTime);
Comment 31 wind.li 2003-10-29 06:57:18 UTC
Created attachment 10735 [details]
Patch to get back the lose fields and support query "criterion"
Comment 32 wind.li 2003-10-29 07:17:05 UTC
This patch is base on our big patch.You need apply our big patch
before apply this patch.
See 
http://bugzilla.mozilla.org/show_bug.cgi?id=219559  for detail.
Effect:
   1.You can nearly access all contact folder in outlook.(see bellow)
   2.Better perfomance.
   3.Get back the lost fields.
   4.criterion query on both OP and OE.

Know issue:
   If you have two folders with the same name in your outlook,you can
only access the first folder.
Comment 33 wind.li 2003-10-29 07:20:57 UTC
Created attachment 10736 [details]
Workable binary for last patch.Tested by m645.
Comment 34 wind.li 2003-10-30 15:27:28 UTC
Created attachment 10793 [details]
Mapping mail list as a table
Comment 35 wind.li 2003-10-30 15:48:56 UTC
file a new issue for the last patch.
http://www.openoffice.org/issues/show_bug.cgi?id=21912
Comment 36 hans_werner67 2004-02-02 12:55:02 UTC
change subcomponent to 'none'
Comment 37 wind.li 2004-02-10 06:16:27 UTC
Migrate to a new account for security reasons.
Comment 38 wind.li 2004-03-04 11:20:57 UTC
fixed in cws mozab03
Comment 39 wind.li 2004-03-09 11:23:10 UTC
verified in mozab03 wnt build
Comment 40 marc.neumann 2004-03-17 09:20:13 UTC
verify in CWS mozab03
Comment 41 ace_dent 2008-05-16 03:30:20 UTC
This Issue is 'Verified' and not updated in 1yr+, so Closing.
A Closed Issue is a Happy Issue (TM).

Regards,
Andrew
 
Cleaning-up and Closing old Issues as part of:
~ The Grand Bug Squash, pre v3 ~