31.10.2020, 13:02
Hallo Forum,
nach längerer vergeblicher Suche hier nun ein Code, mit dem sich das Layout einer Visitenkarte übertragen lässt.
Ich hoffe, es hilft dem einen oder anderen.
fG Rolf
'Visitenkarte an Modellkarte anpassen
Sub changeBusinessCardLayout()
'Deklarationen
Dim olContacts As Outlook.Items
Dim olModelcontact As ContactItem
Dim olXml As String
'Kontaktauflistung
Set olContacts = CreateObject("Outlook.Application").GetNamespace("MAPI").GetDefaultFolder(olFolderContacts).Items
'olXml-Modellkontakt
Set olModelcontact = olContacts.Item("Hans Meier")
olXml = olModelcontact.BusinessCardLayoutXml
'Modell auf einen anderen Kontakt anwenden
With olContacts.Item("Paul Müller")
.BusinessCardLayoutXml = olXml
.Save
.Display
End With
End Sub
nach längerer vergeblicher Suche hier nun ein Code, mit dem sich das Layout einer Visitenkarte übertragen lässt.
Ich hoffe, es hilft dem einen oder anderen.
fG Rolf
'Visitenkarte an Modellkarte anpassen
Sub changeBusinessCardLayout()
'Deklarationen
Dim olContacts As Outlook.Items
Dim olModelcontact As ContactItem
Dim olXml As String
'Kontaktauflistung
Set olContacts = CreateObject("Outlook.Application").GetNamespace("MAPI").GetDefaultFolder(olFolderContacts).Items
'olXml-Modellkontakt
Set olModelcontact = olContacts.Item("Hans Meier")
olXml = olModelcontact.BusinessCardLayoutXml
'Modell auf einen anderen Kontakt anwenden
With olContacts.Item("Paul Müller")
.BusinessCardLayoutXml = olXml
.Save
.Display
End With
End Sub