PC Review


Reply
Thread Tools Rate Thread

Where are BCM contacts actually stored?

 
 
zephyr
Guest
Posts: n/a
 
      18th Jan 2006
I have a guy writing a macro that allows us to generate a report of
our BCM's contact's birthdays. Except it doesn't know where the path
to the contacts is.

The path to Outlook 2003 regular contacts is easy but where is BCM's
contacts by default?

Thanks for unraveling this mystery
 
Reply With Quote
 
 
 
 
Raul
Guest
Posts: n/a
 
      18th Jan 2006
Hi

BCM conacts are stored on the MSDE database normally they are tool files
that store data and they are *.mdf and *.ldf.You can find them by going to
C:\Document & Sett\<user profile>\Local settings\Appl data\Microsoft\BCM


With Regards

Raul Thomas
"zephyr" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a guy writing a macro that allows us to generate a report of
> our BCM's contact's birthdays. Except it doesn't know where the path
> to the contacts is.
>
> The path to Outlook 2003 regular contacts is easy but where is BCM's
> contacts by default?
>
> Thanks for unraveling this mystery



 
Reply With Quote
 
Luther
Guest
Posts: n/a
 
      18th Jan 2006
If you reach regular contacts, then for BCM contacts you just need to
know the names of the BCM store and folder, and the rest is the same.

To get to BCM in C#, use the following:

NameSpace ns = ((Application)app).GetNamespace("MAPI");
Folders messageStores = ns.Session.Folders;
MAPIFolder bcmFolder = messageStores["Business Contact Manager"];
MAPIFolder bcmContactsFolder = bcmFolder.Folders["Business Contacts"];

 
Reply With Quote
 
zephyr
Guest
Posts: n/a
 
      19th Jan 2006
We're still not getting it. Here's a copy of our thread and we hope
someone will be able to help us with this task: Generate a macro that
gives us a birthday report from BCM

~~~~~~~~~~
In Business Contact Manager, Is there a way to produce a report for
birthdays?

>>I don't have any experience with BCM, but if the contacts use the same structure as Outlook contacts, then I'm pretty sure I can produce a macro that'll do this. Is that an option?
>> Here's the code. Follow these instructions to set the code up and use it.


1. Start Outlook
2. Click Tools->Macro->Visual Basic Editor
3. If not already expanded, expand Modules and click on Module1
4. Copy the code below and paste it into the right-hand pane of the
editor window
5. Edit the code as necessary. I included a comment line wherever
something needs to be edited
6. Click the diskette icon on the toolbar to save the changes
7. Close the VB Editor
8. Click Tools->Macro->Security
9. Set the Security Level to Medium. The macro cannot run if the
Security Level is High

Sub ListBirthdays()
Dim strMonths As String, _
arrMonths As Variant, _
intCount As Integer, _
olkContacts As Outlook.MAPIFolder, _
olkContact As Outlook.ContactItem, _
olkMatches As Outlook.Items, _
objFSO As Object, _
objFile As Object
strMonths = InputBox("Enter the months (comma separated) you want
to list birthdays for.", "Birthday List")
If strMonths <> "" Then
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Change the path and filename below as needed
Set objFile =
objFSO.CreateTextFile("C:\eeTesting\BirthdayList.txt")
arrMonths = Split(strMonths, ",")
Set olkContacts = OpenMAPIFolder("\Saved Mail\Inbox")
For intCount = LBound(arrMonths) To UBound(arrMonths)
objFile.WriteLine "Birthdays in " &
MonthName(arrMonths(intCount))
Set olkMatches = olkContacts.Items.Restrict("[Birthday] <>
''")
For Each olkContact In olkMatches
If Month(olkContact.Birthday) =
Int(arrMonths(intCount)) Then
objFile.WriteLine vbTab & olkContact.FullName & "
" & olkContact.Birthday
End If
Next
Next
objFile.Close
End If
Set objFile = Nothing
Set objFSO = Nothing
Set olkMatches = Nothing
Set olkContact = Nothing
Set olkContacts = Nothing
MsgBox "All done!"
End Sub

'Credit where credit is due.
'The code below is not mine (well, a little of it is). I found it
somewhere on the
'internet but do not remember where or who the author is. The
original author(s)
'deserves all the credit for these functions.
Function OpenMAPIFolder(ByVal szPath As String)
Dim app, ns, flr As MAPIFolder, szDir, i
On Error GoTo errOMF
Set flr = Nothing
Set app = CreateObject("Outlook.Application")
If Left(szPath, Len("\")) = "\" Then
szPath = Mid(szPath, Len("\") + 1)
Else
Set flr = app.ActiveExplorer.CurrentFolder
End If
While szPath <> ""
i = InStr(szPath, "\")
If i Then
szDir = Left(szPath, i - 1)
szPath = Mid(szPath, i + Len("\"))
Else
szDir = szPath
szPath = ""
End If
If IsNothing(flr) Then
Set ns = app.GetNamespace("MAPI")
Set flr = ns.Folders(szDir)
Else
Set flr = flr.Folders(szDir)
End If
Wend
Set OpenMAPIFolder = flr
On Error GoTo 0
Exit Function
errOMF:
Set OpenMAPIFolder = Nothing
On Error GoTo 0
End Function

Function IsNothing(Obj)
If TypeName(Obj) = "Nothing" Then
IsNothing = True
Else
IsNothing = False
End If
End Function

~~~~~~~~~~~~~~~~~~~~~~~~~~~
We need to make a change. Before we do that though I need to find out
what the path is to where BCM stores its contacts. To do that we'll
use another macro.

Sub ShowFolderPath()
MsgBox "The path to the selected folder is " & vbCrLf & _
Application.ActiveExplorer.CurrentFolder.FolderPath,
vbInformation + vbOKOnly, "Show Folder Path"
End Sub

Folloing the instructions I posted above, copy this code and paste it
into Outlook. Next, click on the folder that houses the BCM contacts
and then run the macro. It'll pop up a dialog-box giving the path to
that folder. Post that path here and I'll fix the code.
~~~~~~~~~~~~~~~`
Seems to bomb right here:

Set olkMatches = olkContacts.Items.Restrict("[Birthday] <> ''")

with an error:

Run Time error '91':
Object variable or With block variable not set

~~~~~~~~~~~~~~

The error means that one of the objects isn't set (i.e. is not an
object). In this case it'd have to be olkContacts. Are you sure the
path for that folder is correct? It seems strange to be looking in a
folder called Inbox for contact information.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are the contacts stored? =?Utf-8?B?YVJLYWRl?= Windows Vista Mail 3 6th Oct 2008 04:41 AM
Outlook 2003 Contacts look weird after 7000 contacts stored inside =?Utf-8?B?bGluZ2xpbmc=?= Microsoft Outlook Discussion 7 13th Jul 2007 03:19 PM
Contacts - Where are they stored? Muz Microsoft Outlook Contacts 1 15th Feb 2004 08:41 PM
Where are Contacts stored? Craig Microsoft Outlook 2 31st Oct 2003 02:02 PM
How are contacts stored? Lynn Microsoft Outlook Contacts 3 27th Oct 2003 09:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:37 AM.