I need a large sample contacts database for testing

M

-mhd

Does anyone know if a large Outlook contacts sample is available
anywhere for download? I need to test some performance issues with
about 3 thousand or more contacts. Has anyone produced a similar
contact folder that has pure fictional data in it? Even another format
if it could be imported to contacts would be helpful.

Thanks

-mhd
 
M

Michael Bauer

Here´s a sample available:

Public Sub CreateTestContacts()
Dim oFolder As Outlook.MAPIFolder
Dim colItems As Outlook.Items
Dim oContact As Outlook.ContactItem
Dim i As Long
Const MAX_CNT As Long = 3000

Set oFolder = Application.Session.PickFolder
If Not oFolder Is Nothing Then
Set colItems = oFolder.Items

For i = 1 To MAX_CNT
Set oContact = colItems.Add
With oContact
.FirstName = "first_" & i
.LastName = "last_" & i
.BusinessAddress = "address_" & i
.Save
End With
Next
End If
End Sub
 
D

David C. Holley

I've got a Access DB that autogenerates names. You could create some VBA
Code to take the names and create Outlook Contacts for them. Let me know
if you'd like the DB.

(I assure you the number of names created would be MORE than sufficent
in terms of numbers.)
 
M

-mhd

Michael Bauer said:
Here´s a sample available:

Public Sub CreateTestContacts()
Dim oFolder As Outlook.MAPIFolder
Dim colItems As Outlook.Items
Dim oContact As Outlook.ContactItem
Dim i As Long
Const MAX_CNT As Long = 3000

Set oFolder = Application.Session.PickFolder
If Not oFolder Is Nothing Then
Set colItems = oFolder.Items

For i = 1 To MAX_CNT
Set oContact = colItems.Add
With oContact
.FirstName = "first_" & i
.LastName = "last_" & i
.BusinessAddress = "address_" & i
.Save
End With
Next
End If
End Sub


Thanks, it is the phone fields I need populating with a bunch of 555
numbers which I just to your idea and it works well.

Is the Advancedsearch method supposed to be faster than Find?

-mhd
 
M

-mhd

David C. Holley said:
I've got a Access DB that autogenerates names. You could create some VBA
Code to take the names and create Outlook Contacts for them. Let me know
if you'd like the DB.

(I assure you the number of names created would be MORE than sufficent
in terms of numbers.)

Thanks David,

I just made an auto generator based on an idea from Michael Bauer.

-mhd
 
M

Michael Bauer

I suppose it depends on the amount of matches. For one match Find could
be faster. To clearify that just test it. Here´s a simple template for
your own tests:

Private Declare Function GetTickCount Lib "kernel32" () As Long
Private lBeginTime As Long
Private lStopTime As Long

Private Sub Test()
' do all initialization
lBeginTime =GetTickCount
' Code to test here
lStopTime =GetTickCount
MsgBox lStopTime - lBeginTime & " ms"
End Sub
 
M

-mhd

Michael Bauer said:
I suppose it depends on the amount of matches. For one match Find could
be faster. To clearify that just test it. Here´s a simple template for
your own tests:

There should only be one match, but I have to search several or all of
the telephone# fields and several sub folders, so I am calling the
Find function several times in a loop until a match is found.

I guess some timing tests are called for, I was just wondering if it
is a given about one method being faster.

Thanks

-mhd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top