ol2021 custom form not displaying pics

john doe

Senior Member
Outlook version
Older version
Email Account
POP3
recently goog forced me to upgrade ol from 2007 to 2021.

the custom contact form that i had used for many years stopped working – it doesn’t display pictures anymore. as far as i can see, the pics are in 2 custom fields, one for path, the other the actual pic.

if i go to “developer” and re-design the form with reselection of the pic it does indeed display. but how to make the form to pull the pic path from the appropriate custom field?

what gives?
 

Attachments

  • ilkkaContactViewWithPhoto.zip
    10.9 KB · Views: 0

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
This is what I see - and after adding a picture, it still looks like this. The field name in the form is different that what Outlook uses now. I don't remember the control name changing but they did add some new controls - will boot a 2007 test machine to double check it.

Are you using it as a template or published form? Updating contacts using a published form is easy -

1650378816316.png


Original field name:
1650379403986.png


But the field name is empty - if I add the field you have for the photo file field, it works.
1650380285740.png


1650380346980.png


New photo field name:
1650379441515.png
 

john doe

Senior Member
Outlook version
Older version
Email Account
POP3
so if i put OlkContactPhoto1 to the field in the pic, it'll work?

to my knowledge the form IS "published" - though not sure i know what that means...
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
It depends how you added the photo to the form.


f you add the photo link field to the image control, that will work too. (But only on computers where the image exists at that path.)

1650387163647.png
 

john doe

Senior Member
Outlook version
Older version
Email Account
POP3
i think i added the pics following some instructions on your site, diane. but that's 20 years+ ago.

the image existing on a local path is of course sufficient!

so i should create a new form with the image-property value "User Field 1?"
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
If switching out the picture controls fixes it without needing to re-add the photo, do that. Otherwise, edit the control to use the photo file field, since it's less work if you need to fix existing contacts.

If you are using a published form, edit the form, update the version number then publish it - all contacts using the form will pick it up. if you aren't using a custom form, you probably should... I have a script that can update the contact to use a different contacts form.
 

john doe

Senior Member
Outlook version
Older version
Email Account
POP3
i did try to create a new form with the image-property value "User Field 1," but it fails to load the pic referenced on the User Field1. I will only get the right pic by entering it's path directly to User Field2 properties - which defeats the purpose...
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
a new form with the image-property value "User Field 1,"
That is the new photo control or the image control you were using?

If the existing contact photos are not showing if you switch the image control - as long as you have a path, a macro could move the contact photos.

This would likely need to be customized to get the images off the old form - but if the photo file path is valid, that field could be used in the next article to add images to the new control.

This adds images to the photo control
 

john doe

Senior Member
Outlook version
Older version
Email Account
POP3
the links look good - though i doubt my vba skills.

photo control - image control - i'm not sure i understand the question. the only option i get is to enter the pics path directly, not anything else.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Your form uses a control called imgPhoto, which is probably the Forms Image control - the photo control name in outlook 16.0 is OlkContactPhoto

1650590293475.png


If I have some time over the weekend, I'll take a look at your form and see what needs to be changed to move the image to the photo control.
 

john doe

Senior Member
Outlook version
Older version
Email Account
POP3
Your form uses a control called imgPhoto, which is probably the Forms Image control - the photo control name in outlook 16.0 is OlkContactPhoto

View attachment 3580

If I have some time over the weekend, I'll take a look at your form and see what needs to be changed to move the image to the photo control.
i'm sure i'm using imgPhoto - but i don't even know how to get to the menu as above...
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Right c;lick on the control toolbox - then custom controls to get that dialog. It will have a lot more in it - I enabled Show selected items for the screenshot.
1650860028239.png
 

john doe

Senior Member
Outlook version
Older version
Email Account
POP3
ok, now with your instruction i get to the right menu at least - but dunno what to do there...
Screenshot (405).png
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Browse the list - the Forms 2.0 image control should be checked - also find the outlook contact photo control and check it.

Then add it to your form and run it to test.
 

john doe

Senior Member
Outlook version
Older version
Email Account
POP3
ok, now i do get the photo field to the form. but it still does not display the photo referenced on userField1.

should i change the imgPhoto on the code to OlkContactPhoto?

should imgPhoto.Picture be OlkContactPhoto.Picture or just OlkContactPhoto?
---------------------------------------------------------------------------

Dim IsLoading

Dim imgPhoto



Function Item_Open()

Dim objPage

IsLoading = True

Set objPage = Item.GetInspector.ModifiedFormPages("General")

Set imgPhoto = objPage.Controls("imgPhoto")

Call LoadPhoto()

Set objPage = Nothing

IsLoading = False

End Function



Function Item_Close()

Set imgPhoto = Nothing

End Function



Sub Item_PropertyChange(ByVal Name)

If Not IsLoading Then

Select Case Name

Case "User1"

Call LoadPhoto()

End Select

End If

End Sub



Sub cmdRefresh_Click()

Call LoadPhoto()

End Sub



Sub LoadPhoto()

If Item.User1 <> "" Then

imgPhoto.Picture = LoadPicture(Item.User1)

End If

End Sub
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
`I haven't had time to take a look at it yet - but something like this should work with the outlook photo control

strphoto = Item.User1.value
item.AddPicture strPhoto
 
Similar threads
Thread starter Title Forum Replies Date
J Does the .fdm contain my custom form? How to make ol use it? - ol2007 Outlook VBA and Custom Forms 4
N "Perform a Custom Action" Outlook VBA and Custom Forms 0
cbufacchi Outlook 365 Populate custom Outlook Appoint form Outlook VBA and Custom Forms 2
C Create Meeting With Custom Form Outlook VBA and Custom Forms 2
FryW Need help modifying a VBA script for in coming emails to auto set custom reminder time Outlook VBA and Custom Forms 0
J custom form not displaying pictures Outlook VBA and Custom Forms 7
I Button PDF in Outlook Contact custom form Outlook VBA and Custom Forms 1
K Font Sizing in Custom Form Regions for Contacts Outlook VBA and Custom Forms 1
V Update new custom field Outlook VBA and Custom Forms 5
D Anyone tell me where custom view settings are stored? Outlook VBA and Custom Forms 9
S Outlook 2016 Arrange tasks by date, additional custom sorting, but still use friendly terms like Today, Tomorrow, This week? Using Outlook 1
K can't get custom form to update multiple contacts using VBA Outlook VBA and Custom Forms 3
H Custom Outlook Contact Form VBA Outlook VBA and Custom Forms 1
S Custom Field Cannot Be Displayed In Views Outlook VBA and Custom Forms 2
D Custom Search Folders not refreshing/updating automatically Using Outlook 0
F Validation on custom task form after task acceptance Outlook VBA and Custom Forms 1
K UDF with formula not showing on Calendar custom view. Outlook VBA and Custom Forms 0
S Create a clickable custom column field Outlook VBA and Custom Forms 0
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
M VbScript for Command Button on Contacts Custom Form Using Outlook 1
G Other users can't see P.2 with custom fields in Form Outlook VBA and Custom Forms 0
O Create a custom contact form - questions before messing things up... Outlook VBA and Custom Forms 4
S Reference Custom Fields with VBA Outlook VBA and Custom Forms 2
L Custom Form Tutoral? Outlook VBA and Custom Forms 6
D Lost Access to Custom Form Outlook VBA and Custom Forms 4
M vCard does not have user-defined fields from my custom contact form (365) Using Outlook 1
S Outlook Custom Form Scripting only working when clicking on "Run this form" Outlook VBA and Custom Forms 2
A Custom VBA to sort emails into folders Outlook VBA and Custom Forms 0
Victor_50 Outlook 2013 Custom Contact Form starts with "E-mail 2" Outlook VBA and Custom Forms 2
C Custom Form (seperate layout pages and message reading pane) Outlook VBA and Custom Forms 0
C Reading Pane for Custom Form Outlook VBA and Custom Forms 2
M Custom Calendar Print Suggestions? Using Outlook 0
K Custom Category Colors Using Outlook 2
N Custom Form Controls Not Visible To Recipient Outlook VBA and Custom Forms 3
E To convert imported data to custom fields in Task list Outlook VBA and Custom Forms 1
Randy Redekopp How To Merge Contact Info to Email Custom Form Template Using Outlook 2
D Problem with custom form including _DocSiteControl1 Outlook VBA and Custom Forms 0
C Custom Outlook Form - Populate Information from Radio Button / Check Box Using Outlook 0
H Custom Signature Not Displayed When Account Selected Outlook VBA and Custom Forms 10
E Custom formula for columns Using Outlook 3
W Message class changes of a custom form changes to the default form Using Outlook 2
A Possible to hide ribbon with custom appointment form? Outlook VBA and Custom Forms 3
S Custom Form, copy user field data to message body Outlook VBA and Custom Forms 12
Andrew Quirl Custom form to route requests based on input criteria Outlook VBA and Custom Forms 1
D Using a VBA Custom Form to Send Reoccurring Email Upon Task Completion Outlook VBA and Custom Forms 4
W Setting up a custom form Outlook VBA and Custom Forms 2
A Greyed out checkbox in custom form Outlook VBA and Custom Forms 4
Z Outlook Custom Form: Adding Dropdown(Project Code) at the end of subject Outlook VBA and Custom Forms 0
Z Adding dropdown list using custom form Outlook VBA and Custom Forms 7
G Entered data in custom field goes in card and does not stay in list view Outlook VBA and Custom Forms 1

Similar threads

Top