G
Graeme
I'm trying to customise a contact form and add in the client's photo. I tried
the instructions on http://www.outlookcode.com/article.aspx?id=33 but got
stuck trying to use a naming convention to link each contact with a different
picture.
Here's the code they give:
Function Item_Open()
Set objInsp = Item.GetInspector
Set objPage = objInsp.ModifiedFormPages("Picture")
Set imgPicture = objPage.Controls("imgPicture")
If Item.BillingInformation <> "" Then
imgPicture.Picture = _
LoadPicture(Item.BillingInformation)
End If
End Function
I made an image control called 'imgPicture', then stored the pictures in the
field "User Defined 4" and then changing the code to
Function Item_Open()
Set objInsp = Item.GetInspector
Set objPage = objInsp.ModifiedFormPages("Picture")
Set imgPicture = objPage.Controls("imgPicture")
If Item.BillingInformation <> "" Then
imgPicture.Picture = _
LoadPicture(Item.UserDefined4)
End If
End Function
I was feeling very clever and expected to open the contact form and see the
picture. However Outlook didn't like my code, wanted me to debug, and all
sorts of scary stuff.
What did I do wrong?
Graeme
the instructions on http://www.outlookcode.com/article.aspx?id=33 but got
stuck trying to use a naming convention to link each contact with a different
picture.
Here's the code they give:
Function Item_Open()
Set objInsp = Item.GetInspector
Set objPage = objInsp.ModifiedFormPages("Picture")
Set imgPicture = objPage.Controls("imgPicture")
If Item.BillingInformation <> "" Then
imgPicture.Picture = _
LoadPicture(Item.BillingInformation)
End If
End Function
I made an image control called 'imgPicture', then stored the pictures in the
field "User Defined 4" and then changing the code to
Function Item_Open()
Set objInsp = Item.GetInspector
Set objPage = objInsp.ModifiedFormPages("Picture")
Set imgPicture = objPage.Controls("imgPicture")
If Item.BillingInformation <> "" Then
imgPicture.Picture = _
LoadPicture(Item.UserDefined4)
End If
End Function
I was feeling very clever and expected to open the contact form and see the
picture. However Outlook didn't like my code, wanted me to debug, and all
sorts of scary stuff.
What did I do wrong?
Graeme