OLK2K3: Exporting Outlook field data to either Access DB or CSV fi

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Anyone have any code snippets/examples that will loop through a Public Folder
and extract the Form Field contents from each item and then write/export that
data to either an Access DB or CSV file?

Thank in Advance!
 
OK - I found some example code... I've re-coded it to emulate my
application, the major difference I see and don't know how to handle is the
path information to the location of the items I want to export. They are in
"Public Folders => All Public Folders => Public Root". How do I get all this
path information into the script to find the items I want to export?

'---------------Exporting-----------------

Dim rst
Dim dbe
Dim wks
Dim dbs
Dim nms
Dim fld
Dim itms
Dim itm
Dim strAccessPath
Dim appAccess
Dim strFolder
Dim fFound

Sub cmdExport_Click()

Set nms = Application.GetNameSpace("MAPI")
strFolder = "- HELP DESK QUEUE"

'Check for existence of OSRs from Access folder
'and exit if not found
fFound = False
FindFolder nms.Folders("Public Root").Folders, 0, strFolder

If fFound = True Then
Set fld = nms.Folders("Public Root").Folders(strFolder)
ElseIf fFound = False Then
MsgBox "OSRs to Export folder not found; exiting"
Exit Sub
End If

:
 
It would be "cool" if I could open up a browse window and just select the
folder to export...
 
You can. Take a look at the Namespace.Pickfolder method in Outlook.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Thanks Sue, that method (NameSpace.PickFolder) is awesome and really makes
this export utility I am coding very versatile.

Regards,

Bill Billmire -
 
Back
Top