title image


Smiley Re: Adresse in Formatvorlage kopieren
Hallo,

mit Word sollte es ähnlich gehen wie dieses Beispiel für XLS:





Sub import_von_Outlook()

'Attribute import_von_Outlook.VB_ProcData.VB_Invoke_Func = " \n14"

'========================================================



Dim olMAPI, workingFolder, myNameSpace As Object

Dim I As Integer

Const olFolderContacts = 10



Set olMAPI = CreateObject("Outlook.Application")

Set myNameSpace = olMAPI.GetNamespace("MAPI")

Set workingFolder = myNameSpace.GetDefaultFolder(olFolderContacts)



Range("A2").Select

For I = 1 To workingFolder.items.Count

Set objItem = workingFolder.items(I)

With objItem

ActiveCell.Value = .Title

ActiveCell.Offset(0, 1).Value = .LastName

ActiveCell.Offset(0, 2).Value = .FirstName

ActiveCell.Offset(0, 3).Value = .BusinessAddressStreet

ActiveCell.Offset(0, 4).Value = .BusinessAddressPostalCode

ActiveCell.Offset(0, 5).Value = .BusinessAddressCity

ActiveCell.Offset(0, 6).Value = .Birthday

ActiveCell.Offset(0, 7).Value = .JobTitle

'ActiveCell.Offset(0, 8).Value = .User4

'ActiveCell.Offset(0, 9).Value = .User3

'ActiveCell.Offset(0, 7).Value = .Body

'ActiveCell.Offset(0, 8).Value = .Email1Address

'ActiveCell.Offset(0, 9).Value = .HomeTelephoneNumber

'ActiveCell.Offset(0, 10).Value = .BusinessTelephoneNumber

'ActiveCell.Offset(0, 11).Value = .BusinessFaxNumber

End With

ActiveCell.Offset(1, 0).Select

Next I



Set objItem = Nothing

Set olMAPI = Nothing

End Sub





Weitere Attribute zum "Contact" kannst du dir über den OL-Objekt Katalog ansehen & einbauen.


Neandr	            //gW
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 - Build ID: 2007112718; 
TB version  2.0.0.9 (20071031)
jre6.0.04; MS Office 10 
Intel Pro/W LAN 2100 3B Mini PCI with WAP; 1&1 DSL mit Fritz!Box 7050/7150



geschrieben von


Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: