Solved

Creating same Tasks, Reminders, and Calendars items for multiple Outlook 2003 and 2007 users with Exchange 2003

Posted on 2008-10-09
13
478 Views
Last Modified: 2011-10-19
Hi All,

I'm looking for a way to add a same set of tasks, reminders, and calender items for 30 Outlook Users...Some using 2003 and others using 2007.

One primitive method i thought about was to create a dummy account and create all the necessary items and then export out to a PST and import to Each account.

I know there has to be a better way...From my initial research, it seems to be in the way of a VB script or something to that effect.  Can anyone help me or direct me to resources to find a solution?

Keep in mind that I have very limited experience with VB scripts or programing for that fact.

Thanks in advance!
0
Comment
Question by:jetli87
13 Comments
 
LVL 22

Expert Comment

by:Paka
ID: 22690857
Exmerge is probably your best bet.  Here's an article that shows how to do these in bulk:
http://www.msexchange.org/tutorials/Adding-Events-Multiple-Mailboxes-Exmerge.html
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22694241
Hi, jetli87.

This is very easy to do with a bit of simple scripting.  Here's how this would work.

1.  Create a data file for each item type.  The data file will be a simple delimited text file.
2.  Place the data file and the script (I'll supply that) on a network share that everyone can access.
3.  Send the user an email containing a link to the script.
4.  Staff click the link and the items are all added to their copy of Outlook.

If you want to pursue this approach, then we'll need to workout the layout of the data files.
0
 
LVL 1

Author Comment

by:jetli87
ID: 22694529
Hi BlueDevalFan,

Yes, I definitely want to pursure more towards scripting.

I'm still trying to understand all the capabilities with Outlook programming.

Thanks for the help in advance...let me know what you need from me.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22694564
I need to know what information you'll supply for each item type and the order you want it in if it's order dependent.  For example:

Calender Items

1.  Subject
2.  Date/Time
3.  Duration
4.  Reminder set
5.  Reminder time in minutes before start
6.  Location

I have to know what data the script will have available to fill in an item for each item type (appointment and task, reminders aren't a separate item they are part of a task or appointment).  If the order of data for a given item type isn't important, then I can put it in sequence.  Sequence would be important if you already have the data in electronic format in a given sequence.  Otherwise, it's probably immaterial.
0
 
LVL 1

Author Comment

by:jetli87
ID: 22704814
Sorry Blue for the late response...I didn't know you responded already.

Let me gather the data and get back to you later today.
0
 
LVL 1

Author Comment

by:jetli87
ID: 22706965
Here's an example of 3 items:

1)
subject: Collect, post and deposit rent daily  Deadline for all deposits is 4th (mortgage is due on the 5th!)  
Date/Time + duration: 1st-4th of the Month, All day event
Reminder Set = yes
Reminder Time = 1 day before
Location = NA

2)
subject: Delinquencies  Collect late rent
Date/Time = 8th of every month
Duration = 2 hours
Reminder set = yes
Reminder time = 9am
Location = NA

3)
Subject: Petty Cash Request Form  submit to Regional for replenishment of funds
Date/Time = 30th of every month
Duration = 30 minutes
Reminder set = yes
reminder time = 9am
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 76

Expert Comment

by:David Lee
ID: 22707154
Are these are all appointments?  Some sound like tasks, but tasks don't have a duration, just a due date.  For those appointments that are not all day events, we'll need a starting time.
0
 
LVL 1

Author Comment

by:jetli87
ID: 22707287
sorry for confusion..yes all Calendar items.  Here's the revised list:

1)
subject: Collect, post and deposit rent daily  Deadline for all deposits is 4th (mortgage is due on the 5th!)  
Date =1st-4th
Start/end = 9am on the 1st, 5pm on the 4th
Reminder Set = yes
Reminder Time = 9am on the 1st
Location = NA

2)
subject: Delinquencies  Collect late rent
Date= 8th of every month
Start/End = 9am / 11am
Duration = 2 hours
Reminder set = yes
Reminder time = 9am
Location = NA

3)
Subject: Petty Cash Request Form  submit to Regional for replenishment of funds
Date = 30th of every month
Start/End = 9am / 9:30am
Duration = 30 minutes
Reminder set = yes
reminder time = 9am
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22772914
Apologies for being slow.  I had to figure out how best to handle the recurring appointments.  The solution comes in two parts.  This is part 1.  It exports appointments to a text file to be used by the second routine.  I'll explain how everything works in the next post.
Dim objFSO, objFile, olkItem, olkPattern

Set objFSO = CreateObject("Scripting.FileSystemObject")

'Change the file name and path on the following line'

Set objFile = objFSO.CreateTextFile("C:\eeTesting\Appointments.txt", True)

For Each olkItem In Application.ActiveExplorer.Selection

    Set olkPattern = olkItem.GetRecurrencePattern

    objFile.WriteLine "[Item]"

    With olkItem

        objFile.WriteLine "Subject=" & .Subject

        objFile.WriteLine "Start=" & .Start

        objFile.WriteLine "End=" & .End

        objFile.WriteLine "Reminder=" & .ReminderSet

        objFile.WriteLine "ReminderMinutes=" & .ReminderMinutesBeforeStart

        objFile.WriteLine "Location=" & .Location

        objFile.WriteLine "IsRecurring=" & .IsRecurring

        With olkPattern

            objFile.WriteLine "DayOfMonth=" & .DayOfMonth

            objFile.WriteLine "DayOfWeekMask=" & .DayOfWeekMask

            objFile.WriteLine "Duration=" & .Duration

            objFile.WriteLine "EndTime=" & .EndTime

            objFile.WriteLine "Interval=" & .Interval

            objFile.WriteLine "MonthOfYear=" & .MonthOfYear

            objFile.WriteLine "NoEndDate=" & .NoEndDate

            objFile.WriteLine "PatternEndDate=" & .PatternEndDate

            objFile.WriteLine "PatternStartDate=" & .PatternStartDate

            objFile.WriteLine "RecurrenceType=" & .RecurrenceType

            objFile.WriteLine "StartTime=" & .StartTime

        End With

    End With

    objFile.WriteLine "[End Item]"

Next

objFile.Close

Set objFile = Nothing

Set objFSO = Nothing

Set olkItem = Nothing

MsgBox "Export complete.", vbInformation + vbOKOnly, "Export Appointments"

WScript.Quit

Open in new window

0
 
LVL 1

Author Comment

by:jetli87
ID: 22772924
No problem for the delay...I appreciate the help very much.

I'm newbie at this outlook programming stuff...can you give me details on how to utlize the script once ready?

thanks agian.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22772978
This is part 2.  It's the import procedure.  Here's how to use this.

1.  Open Notepad.
2.  Copy the export procedure from the post above and paste it into Notepad.
3.  Edit the code as needed.  I placed a comment line before any line that needs to change.
4.  Save the file with a .vbs extension.
5.  Close and re-open Notepad.
6.  Copy the import procedure below and paste it into Notepad.
7.  Edit the code as needed.
8.  Save the file with a .vbs extension.
9.  Create the appointments you want to duplicate on a calendar, or, if they already exist, go to the calendar and select them.  
10.  Run the export procedure.  It creates a text file detailing the appointments.
11.  Place the text file and the import procedure on a network share.
12.  Send a link to the import script to anyone needing a copy of the appointments.
13.  When they click the link the import reads the text file and creates the appointments on their calendar.

Const olAppointmentItem = 1

Dim objFSO, objFile, strBuffer, str1Char, olkApp, olkAppt, olkRecur, arrItem, varItem

Set olkApp = GetObject(,"Outlook.Application")

Set objFSO = CreateObject("Scripting.FileSystemObject")

'The file name on the next line of code has to match the file name in the export procedure.  The path can be to any folder.'

Set objFile = objFSO.OpenTextFile("C:\eeTesting\Appointments.txt")

Do Until objFile.AtEndOfStream

    strBuffer = objFile.ReadLine

    str1Char = Left(strBuffer, 1)

    Select Case str1Char

        Case "", "'"    'Ignore lines that begin with a space or apostrophe'

        Case "["

            If strBuffer = "[Item]" Then

                Set olkAppt = olkApp.CreateItem(olAppointmentItem)

                Set olkRecur = Nothing

            Else

                If strBuffer = "[End Item]" Then

                    olkAppt.Save

                End If

            End If

        Case Else

            arrItem = Split(strBuffer, "=")

            Select Case arrItem(0)

                Case "Subject"

                    olkAppt.Subject = arrItem(1)

                Case "Start"

                    olkAppt.Start = arrItem(1)

                Case "Duration"

                    olkAppt.Duration = arrItem(1)

                Case "Reminder"

                    If arrItem(1) = "Yes" Then

                        olkAppt.ReminderSet = True

                    End If

                Case "ReminderTime"

                    olkAppt.ReminderMinutesBeforeStart = arrItem(1)

                Case "Location"

                    olkAppt.Location = arrItem(1)

                Case "IsRecurring"

                    If arrItem(1) = "True" Then

                        Set olkRecur = olkAppt.GetRecurrencePattern

                    End If

                Case "DayOfMonth"

                    If TypeName(olkRecur) = "RecurrencePattern" Then

                        If arrItem(1) <> "0" Then

                            olkRecur.DayOfMonth = arrItem(1)

                        End If

                    End If

                Case "DayOfWeekMask"

                    If TypeName(olkRecur) = "RecurrencePattern" Then

                        olkRecur.DayOfWeekMask = arrItem(1)

                    End If

                Case "Duration"

                    If TypeName(olkRecur) = "RecurrencePattern" Then

                        olkRecur.Duration = arrItem(1)

                    End If

                Case "EndTime"

                    If TypeName(olkRecur) = "RecurrencePattern" Then

                        olkRecur.EndTime = arrItem(1)

                    End If

                Case "Interval"

                    If TypeName(olkRecur) = "RecurrencePattern" Then

                        olkRecur.Interval = arrItem(1)

                    End If

                Case "MonthOfYear"

                    If TypeName(olkRecur) = "RecurrencePattern" Then

                        If arrItem(1) <> "0" Then

                            olkRecur.MonthOfYear = arrItem(1)

                        End If

                    End If

                Case "NoEndDate"

                    If TypeName(olkRecur) = "RecurrencePattern" Then

                        olkRecur.NoEndDate = arrItem(1)

                    End If

                Case "PatternEndDate"

                    If TypeName(olkRecur) = "RecurrencePattern" Then

                        If IsDate(arrItem(1)) Then

                            olkRecur.PatternEndDate = arrItem(1)

                        End If

                    End If

                Case "PatternStartDate"

                    If TypeName(olkRecur) = "RecurrencePattern" Then

                        If IsDate(arrItem(1)) Then

                            olkRecur.PatternStartDate = arrItem(1)

                        End If

                    End If

                Case "RecurrenceType"

                    If TypeName(olkRecur) = "RecurrencePattern" Then

                        olkRecur.RecurrenceType = arrItem(1)

                    End If

                Case "StartTime"

                    If TypeName(olkRecur) = "RecurrencePattern" Then

                        olkRecur.StartTime = arrItem(1)

                    End If

            End Select

    End Select

Loop

objFile.Close

Set objFSO = Nothing

Set objFile = Nothing

Set olkApp = Nothing

Set olkTask = Nothing

Set olkAppt = Nothing

Set olkRecur = Nothing

MsgBox "Export complete.", vbInformation + vbOKOnly, "Export Appointments"

WScript.Quit

Open in new window

0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 22772989
Ok, I forgot to change something in the initial post of the export code.  Use this version instead.

I should also note that Outlook has to be open for both the export and import procedures to work.
Dim objFSO, objFile, olkApp, olkItem, olkPattern

Set olkApp = GetObject(,"Outlook.Application")

Set objFSO = CreateObject("Scripting.FileSystemObject")

'Change the file name and path on the following line'

Set objFile = objFSO.CreateTextFile("C:\eeTesting\Appointments.txt", True)

For Each olkItem In olkApp.ActiveExplorer.Selection

    Set olkPattern = olkItem.GetRecurrencePattern

    objFile.WriteLine "[Item]"

    With olkItem

        objFile.WriteLine "Subject=" & .Subject

        objFile.WriteLine "Start=" & .Start

        objFile.WriteLine "End=" & .End

        objFile.WriteLine "Reminder=" & .ReminderSet

        objFile.WriteLine "ReminderMinutes=" & .ReminderMinutesBeforeStart

        objFile.WriteLine "Location=" & .Location

        objFile.WriteLine "IsRecurring=" & .IsRecurring

        With olkPattern

            objFile.WriteLine "DayOfMonth=" & .DayOfMonth

            objFile.WriteLine "DayOfWeekMask=" & .DayOfWeekMask

            objFile.WriteLine "Duration=" & .Duration

            objFile.WriteLine "EndTime=" & .EndTime

            objFile.WriteLine "Interval=" & .Interval

            objFile.WriteLine "MonthOfYear=" & .MonthOfYear

            objFile.WriteLine "NoEndDate=" & .NoEndDate

            objFile.WriteLine "PatternEndDate=" & .PatternEndDate

            objFile.WriteLine "PatternStartDate=" & .PatternStartDate

            objFile.WriteLine "RecurrenceType=" & .RecurrenceType

            objFile.WriteLine "StartTime=" & .StartTime

        End With

    End With

    objFile.WriteLine "[End Item]"

Next

objFile.Close

Set objFile = Nothing

Set objFSO = Nothing

Set olkApp = Nothing

Set olkItem = Nothing

MsgBox "Export complete.", vbInformation + vbOKOnly, "Export Appointments"

WScript.Quit

Open in new window

0
 

Expert Comment

by:ravandyken
ID: 25506981
Hello BlueDevilFan
This is a GREAT idea. I have the same need but I ran into an error running the export. I have attached a file with the error. I am a newbie too. I took a few guesses and replaced "Application." with "outlook." and "Outlook.Application.". I got the same error but with th work outlook instead of application.

Thanks a lot

Rae
outlookapps.JPG
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Create high volume marketing opportunities using email signatures with these top 10 DOs and DON'Ts of email signature marketing.
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now