I am in the process of trying to find out exactly what is in the public folders on a 5.5 server.
I need a script that will tell me what file types are in the folders, who put them there and the date.
I also need the same information for the calendars. I am not sure how to do this efficiently.
So I need to look for the office file types (XLS, DOC, PPT, etc...) and ones for faxes like TIF files.
The last piece is a script to find out what the Rules Assistant has on each folder. That would tell me the FROM and TO rules for mail messages that are dropped in the folders and the dates.
This needs to export to a CSV with the full path to the folder where the files live.
Has anybody done this and have a script that they can send me?
5 1573
I am in the process of trying to find out exactly what is in the public folders on a 5.5 server.
I need a script that will tell me what file types are in the folders, who put them there and the date.
I also need the same information for the calendars. I am not sure how to do this efficiently.
So I need to look for the office file types (XLS, DOC, PPT, etc...) and ones for faxes like TIF files.
The last piece is a script to find out what the Rules Assistant has on each folder. That would tell me the FROM and TO rules for mail messages that are dropped in the folders and the dates.
This needs to export to a CSV with the full path to the folder where the files live.
Has anybody done this and have a script that they can send me?
I'm not a VB expert myself but I'll contact all the VB experts and let them know about it.
Good luck and
God bless
I am in the process of trying to find out exactly what is in the public folders on a 5.5 server.
I need a script that will tell me what file types are in the folders, who put them there and the date.
Do you want the date the postitem/mailitem was created, modified, sent, or recieved?
I supposed you want e-mail address if available but it's not for exchange users.. Do you want their login or their "display name" (ie BARTOLINI or Bart O. Lini.)
Did you want the message subject to?
Also, a sample of what you WANT the final CSV to look would be helpful.
I also need the same information for the calendars. I am not sure how to do this efficiently.
I'm not sure I can do calendars or Rules but haven't worked on that part yet... maybe you can look for an example and post what you find?
Has anybody done this and have a script that they can send me?
I haven't, no. I will try to do what I can but I'm limited to using Outlook 2003 / Exchange 2000, so what I come up with may not be compatible.
This has stuff commented out because it's a work in progress and I may use some of it.. anyhow, run it and let me know of any errors so far. - Option Explicit
-
Dim oFile As Scripting.TextStream
-
'Set path to your export file here
-
Const sFilePath As String = "c:\PublicFolderExport.csv"
-
'Set file extensions to look for
-
Const sExtensionsToLog As String = "doc ppt xls tif"
-
-
Sub PublicFolders2CSV()
-
Dim oFSO As New FileSystemObject
-
On Error Resume Next
-
Set oFile = oFSO.CreateTextFile(sFilePath, True)
-
If Err.Number <> 0 Then
-
MsgBox "Could not create '" & sFilePath & "'. Make sure it is not read locked by another program."
-
GoTo Quit:
-
End If
-
On Error GoTo 0
-
Call ExportPublicMessages(Application.GetNamespace("MAPI").GetDefaultFolder(olPublicFoldersAllPublicFolders).EntryID)
-
Quit:
-
Set oFile = Nothing
-
Set oFSO = Nothing
-
End Sub
-
-
Private Sub ExportPublicMessages(ByVal sEntryID As String)
-
Dim i As Integer
-
Dim lngCount As Long
-
Dim oSubFolder As Outlook.MAPIFolder
-
Dim oFolder As Outlook.MAPIFolder
-
Dim itm As Object
-
Dim oAppointment As AppointmentItem
-
Dim oContact As ContactItem
-
Dim oDistListItem As DistListItem
-
Dim oJournalItem As JournalItem
-
Dim oMailItem As MailItem
-
Dim oNoteItem As NoteItem
-
Dim oPostItem As PostItem
-
Dim oTaskItem As TaskItem
-
-
Dim sSender As String
-
Dim sFiles As String
-
'Get folder from entryID
-
Set oFolder = Application.GetNamespace("MAPI").GetFolderFromID(sEntryID)
-
'
-
' If oFolder Is Nothing Then
-
' GoTo Quit
-
' End If
-
-
Dim filename
-
-
-
-
For Each itm In oFolder.Items
-
If itm.Class = olMail Or itm.Class = olPost Then
-
sFiles = ParseFilesWithExtension(itm)
-
If sFiles <> Empty Then oFile.WriteLine ("""" & oFolder.FolderPath & """,""" & itm.ReceivedTime & """,""" & itm.Subject & """,""" & ParseEmailOrX400(itm.SenderEmailAddress) & """,""" & sFiles & """")
-
End If
-
' If itm.Class = olMail Then
-
' Set oMailItem = itm
-
' Dim sfrom
-
' sfrom = oMailItem.SenderEmailAddress
-
' Stop
-
' ElseIf itm.Class = olPost Then
-
' Set oPostItem = itm
-
' Stop
-
' End If
-
Next 'itm
-
-
For Each oSubFolder In oFolder.Folders
-
ExportPublicMessages (oSubFolder.EntryID)
-
Next 'folder
-
-
Quit:
-
-
End Sub
-
-
Function ParseFilesWithExtension(itm As Object) As String
-
Dim Atmt As Attachment
-
Dim sFiles As String
-
Dim arTmp
-
' If Not oMail Is Nothing Then
-
For Each Atmt In itm.Attachments
-
arTmp = Split(Atmt.filename, ".")
-
If sFiles <> Empty Then sFiles = ";" & sFiles
-
If InStr(1, sExtensionsToLog, arTmp(UBound(arTmp))) Then sFiles = sFiles & Atmt.filename
-
'Atmt.SaveAsFile filename
-
Next Atmt
-
' Set oMail = Nothing
-
' End If
-
ParseFilesWithExtension = sFiles
-
End Function
-
-
-
Function ParseEmailOrX400(ByVal sIn As String) As String
-
If InStr(1, sIn, "/") > 0 Then
-
Dim arUser
-
arUser = Split(sIn, "/")
-
ParseEmailOrX400 = Replace(arUser(UBound(arUser)), "CN=", "")
-
Else
-
ParseEmailOrX400 = sIn
-
End If
-
End Function
-
Thanks for helping out.
I ran the script and here is the error message;
Line 2 Column 17
Microsoft VB Script compilation error
Expected end of statement
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Patrick |
last post by:
I'm trying to create a link from Access 2003 to an Exchange 2000
Public Folder called "WMContacts" I choose File => Get External Data=>
Link Tables. I choose Exchange() and the wizard give me the...
|
by: Kim Nørby Andersen |
last post by:
I'm in a situation, where i'm supposed to develop a windows service,
connecting to an external source, and insert new contact persons to an
Exchange public folder. Everything is going well, until I...
|
by: maria.s |
last post by:
Hi,
I try to create a calender-item in the personal calendar folder from an
ASP.NET application using XML-HTTP Request (WebDAV).
System: Windows 2003 SP1, Exchange 2003 SP1
Configuration...
|
by: Krach |
last post by:
Hi everybody!
I'm decided to develop (at least try) a custom pop3 connector / mail
downloader for Exchange 2003. The question is simple: How do I start? I use
MS Visual Studio 2003 (VB .Net). I...
|
by: Chris Thunell |
last post by:
I have some vb.net code that goes and gets some information from our
Contacts Public folder named "Pierce Contacts". As you see from the code
below, i reference this folder by first navigating to...
|
by: Andy |
last post by:
Hi,
I'm trying to get a users free/busy status from exchange from within a
website and
using the code below, but when I run this a login page from MS Outlook Web
Access is retrieved from the...
|
by: arjen1984 |
last post by:
I am now working on C# with WebDAV on Exchange now to get appointments. When I work local on the domain where the server is, i can get the appointments no problem. When I work outside of it, i get an...
|
by: Wiebe Tijsma |
last post by:
Hi,
I'm using C# + webDAV to create a draft message to be sent in a user's
Drafts folder.
I can create the message successfully, however when I open the message
in outlook, it doesn't show...
|
by: krasman |
last post by:
hi everyone,
i hope you might help me on this one. i need to create a contact in a
exchange public folder using dotnet (vb or c#) and exchange 2003, without
using outlook object model. i'm...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |