Hallo zusammen,
folgendes Problem beschäftigt mich schon seit Tagen:
Ich möchte in meine Windows Form das globale Adressbuch von Outlook auslesen und in einer TextBox (textbox1)wiedergeben.
C#-Quelltext
1: 2: 3: 4: 5: 6: 7: 8:
| MSOutlook.Application outlook = (MSOutlook.Application)Marshal.GetActiveObject("Outlool.Application");
MSOutlook.AddressList myAdrBook = outlook.Session.AddressLists["Kontakte"];
foreach (MSOutlook.AddressEntry address in myAdrBook.AddressEntries) { textBox1.Text = textBox1.Text + "\n" + address.Name + " , Adresse: " + address.Address; } |
Nun wird aber "Application" bereits in meiner Windows Form verwendet...dadurch habe ich nun eine Namenskonflikt ..
Leider habe ich keine Ahnung wie ich diesen beheben kann.
Danke schon mal im Voraus !
Grüße
xCrice