Thanx Ken,
The <img> tag doesn't display an exact address of the image so as to apply
the same on other as well and besides after devising a new schema or card how
to apply it on others?
However, I was also quite puzzled how 2 extract the XML. I:
1. selected a preferred card;
2. hit Alt+F11;
3. in "ThisOutlookSession" I pasted the code:
Public Sub GetXML()
Dim obj As Object
Dim oFolder As Outlook.MAPIFolder
Dim oContact As Outlook.ContactItem
Dim oModel As Outlook.ContactItem
Dim colItems As Outlook.Items
Dim i As Long
Dim lCount As Long
Dim sXML As String
Set oFolder = Application.Session.GetDefaultFolder(olFolderContacts)
Set colItems = oFolder.Items
Set oModel = Application.ActiveExplorer.Selection.Item(1)
sXML = oModel.BusinessCardLayoutXml
End Sub
4. then in the immediate window I pasted the following line and hitted enter:
? Application.ActiveExplorer.Selection(1).BusinessCardLayoutXml
5. The XML code generated in the immediate window was:
<card
xmlns="
http://schemas.microsoft.com/office/outlook/12/electronicbusinesscards"
ver="1.0" layout="left" bgcolor="ffffff"><img xmlns="" align="tleft"
area="32" use="photo"/><fld xmlns="" prop="name" align="left" dir="ltr"
style="b" color="000000" size="10"/><fld xmlns="" prop="org" align="left"
dir="ltr" color="000000" size="8"/><fld xmlns="" prop="title" align="left"
dir="ltr" color="000000" size="8"/><fld xmlns="" prop="dept" align="left"
dir="ltr" color="000000" size="8"/><fld xmlns="" prop="blank" size="8"/><fld
xmlns="" prop="telwork" align="left" dir="ltr" color="000000" size="8"/><fld
xmlns="" prop="email" align="left" dir="ltr" color="000000" size="8"/><fld
xmlns="" prop="addrwork" align="left" dir="ltr" color="000000" size="8"/><fld
xmlns="" prop="blank" size="8"/><fld xmlns="" prop="blank" size="8"/><fld
xmlns="" prop="blank" size="8"/><fld xmlns="" prop="blank" size="8"/><fld
xmlns="" prop="blank" size="8"/><fld xmlns="" prop="blank" size="8"/><fld
xmlns="" prop="blank" size="8"/><fld xmlns=""
prop="blank" size="8"/></card>
Thanx again, Pal!!!
--
Best Regards,
FARAZ A. QURESHI
Ken Slovak - said:
Using the business card XML you would use the <img> tag, which is shown in
the schema for business cards. Have you downloaded and looked at that schema
at all?
You could also use the object model for a ContactItem and call the
AddBusinessCardLogoPicture() method for all the contacts in your folder.
Have you looked at the object browser for the Outlook ContactItem object
model at all?