P
philippe
Hello,
I'm trying to copy a picture from one object to another as refered in the
following MSDN Library article.
But all what I get is an error telling me that this object can not use the
method or property.
Any idea what's going wrong ?
Thanks,
Philippe
____________________
http://msdn.microsoft.com/library/d...con98/html/vbconaddingpicturestoyourforms.asp
"Copy a picture from one object to another.
Once a picture is loaded or pasted onto a form or into a picture box or
image control, you can assign it to other forms, picture boxes, or image
controls at run time. For example, this statement copies a picture from a
picture box named picDisplay to an image control named imgDisplay:
Set imgDisplay.Picture = picDisplay.Picture"
____________________________
Here is the code I use :
-----------
Function Item_Open()
Set objNameSpace = Item.Application.GetNameSpace("MAPI")
set fold1 = objNameSpace.Folders("Dossiers publics")
set fold2 = fold1.Folders("Tous les dossiers publics")
set fold3 = fold2.Folders("test")
set fold4 = fold3.Folders("oneOffedForms")
Set objContacts = fold4.Items
iNumItems = objContacts.Count
For i = 1 to iNumItems
Set objContact = objContacts.item(i)
If objContact.LastName = item.LastName then set objContactPhotoSource =
objContact
If objContact.LastName = item.LastName then Set item.Image4.Picture =
objContactPhotoSource.stockPhoto.Picture
Next
End Function
-------------------
I'm trying to copy a picture from one object to another as refered in the
following MSDN Library article.
But all what I get is an error telling me that this object can not use the
method or property.
Any idea what's going wrong ?
Thanks,
Philippe
____________________
http://msdn.microsoft.com/library/d...con98/html/vbconaddingpicturestoyourforms.asp
"Copy a picture from one object to another.
Once a picture is loaded or pasted onto a form or into a picture box or
image control, you can assign it to other forms, picture boxes, or image
controls at run time. For example, this statement copies a picture from a
picture box named picDisplay to an image control named imgDisplay:
Set imgDisplay.Picture = picDisplay.Picture"
____________________________
Here is the code I use :
-----------
Function Item_Open()
Set objNameSpace = Item.Application.GetNameSpace("MAPI")
set fold1 = objNameSpace.Folders("Dossiers publics")
set fold2 = fold1.Folders("Tous les dossiers publics")
set fold3 = fold2.Folders("test")
set fold4 = fold3.Folders("oneOffedForms")
Set objContacts = fold4.Items
iNumItems = objContacts.Count
For i = 1 to iNumItems
Set objContact = objContacts.item(i)
If objContact.LastName = item.LastName then set objContactPhotoSource =
objContact
If objContact.LastName = item.LastName then Set item.Image4.Picture =
objContactPhotoSource.stockPhoto.Picture
Next
End Function
-------------------