can someone tell me how to write the code to open the contacts in outlook 2007 and be able to select contact for email.
ohh....i think it's not that simple..because once a user is given an access to the contacts for outlook he can easily exploit and take advantage of the user's address books.. and spread some virus or what....
what i mean i don't know if there's a way from VB to access the contacts in outlook..if you find one let me know.. LOL
Ok the following code works but if their is a group in the contact folder it stops what code would be needed to detect a group or distribution list?
Thanks in advance
Private objApp As Outlook.Application
Private objNS As Outlook.NameSpace
Private objFolder As Outlook.MAPIFolder
Private objItem As Outlook.ContactItem
Private colAdressFolders As Collection
Dim lngLoop As Long
Set objApp = New Outlook.Application
Set objNS = objApp.GetNamespace("MAPI")
Set colAdressFolders = New Collection
Set objFolder = objNS.Folders.GetFirst ' get root-folder
' recursive loop thrue all folders to co
' llect the references to Adressbooks
For lngLoop = 1 To objFolder.Folders.Count
If objFolder.Folders.Item(lngLoop).DefaultItemType = olContactItem Then
RecursiveSearch objFolder.Folders.Item(lngLoop), colAdressFolders
' open every contact-folder and loop all
For Each objFolder In colAdressFolders
For lngLoop = 1 To objFolder.Items.Count
Set objItem = objFolder.Items(lngLoop)
Debug.Print objItem.FullName, objItem.Email1Address
Private Sub RecursiveSearch(objSubFolder As Outlook.MAPIFolder, colAdrFolders As Collection)
On Error GoTo Errorhandler
Dim lngLoop As Long
' check for entries in this subfolder
If objSubFolder.Items.Count > 0 Then
'add reference to collection
' check for subfolders
If objSubFolder.Folders.Count > 0 Then
For lngLoop = 1 To objSubFolder.Folders.Count
RecursiveSearch objSubFolder.Folders.Item(lngLoop), colAdrFolders
MsgBox "An unexpected error occured methode RECURSIVESEARCH", vbCritical + vbOKOnly, "Problem"
Private Sub Form_Load()
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.
This is the result of previous question answered :
code for the listbox - datagridview interaction
At the top of the code ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...