...
OutlookContact.New1 ' only need to do it once
...
If ChooseContact.Show = cOK Then ' dialog OK
' assign the selected contact reference to an Outlook library Contact object
OutlookContact.Value = ChooseDialog.SelectedContact
' now all the properties should be available
tbxFirstName.Text = OutlookContact.FirstName
tbxLastName.Text = OutlookContact.LastName
....
End If
[FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]
[SIZE=2][FONT=Courier New][COLOR=#0000ff]Sub [/COLOR][/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]App_Start[/SIZE][/FONT]
[SIZE=2][FONT=Courier New] frmMain.Show[/FONT][/SIZE]
[SIZE=2][FONT=Courier New] Contact.New1[/FONT][/SIZE]
[SIZE=2][FONT=Courier New] ChooseContact.New1[/FONT][/SIZE]
[SIZE=2][FONT=Courier New] ChooseContact.Show[/FONT][/SIZE]
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]' Contact.Value = ChooseContact.SelectedContact[/COLOR][/SIZE][/FONT]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] Contact.Value = ChooseContact.SelectedContactName[/SIZE][/FONT]
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]' Label1.Text=Contact.LastName[/COLOR][/SIZE][/FONT]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]End Sub[/COLOR][/SIZE][/FONT]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
That is correct.This is probably why Erel doesn't include the source for Outlook.dll in the libraries folder.
ChooseDialog.New1
Contact.New1
ChooseDialog.Show
Contact.Value = ChooseDialog.SelectedContact
Label14.Text=Contact.LastName & " " & Contact.FirstName
Button8.Text=Contact.MobileTelephoneNumber
ChooseDialog.New1
ChooseDialog.ChooseProperty = True
ChooseDialog.RequiredProperties(MobileTelephoneNumber, HomeTelephoneNumber, BusinessTelephoneNumber)
ChooseDialog.Show
Contact.Value = ChooseDialog.SelectedContact
Button8.Text = ChooseDialog.SelectedProperty
ChooseDialog.New1
[COLOR="Red"]ChooseDialog.Show ' First get a SelectedContact [/COLOR]
ChooseDialog.ChooseProperty = True
ChooseDialog.RequiredProperties(MobileTelephoneNumber, HomeTelephoneNumber, BusinessTelephoneNumber)
ChooseDialog.Show [COLOR="SeaGreen"]' now with a SlectedContact you can get a Property[/COLOR]Contact.Value = ChooseDialog.SelectedContact
Button8.Text = ChooseDialog.SelectedProperty
ChooseDialog.New1
ChooseDialog.Show
ChooseDialog.ChooseProperty = True
ChooseDialog.RequiredProperties(MobileTelephoneNumber, HomeTelephoneNumber, BusinessTelephoneNumber)
ChooseDialog.Show
Contact.Value = ChooseDialog.SelectedContact
Button8.Text = ChooseDialog.SelectedProperty
Sub Globals
Dim Data (0)
.....
End Sub
Without the quotes it looks like a set of unitialised variables!Data() = Array("MobileTelephoneNumber", "HomeTelephoneNumber", "BusinessTelephoneNumber")
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?