Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Outlook
bcm
calendaring
contacts
fax
general
installation
interop
outlook
printing
program_addins
program_forms
program_vba
teamfolders
thirdpartyutil
  
 
date: Fri, 3 Oct 2008 11:54:01 -0700,    group: microsoft.public.outlook.program_vba        back       


Is this possible?Shared calendar reminders between 3 people &remin   
Hi, I'm working on creating a macro to create 2 appointments, but it has to 
send reminders to 3 specific people.

I have the code to create items in the Calendar so I can modify it and setup 
the 2 appointments, but how do you get Outlook to use a shared calendar and 
setup 3 reminders is beyond me right now. Also how do you substract a date 
variable in VB? I'll be asking a user for a date, I then setup 2 reminders 90 
days and 7 days before the 'specified date'. 

Also how do you specify the amount of time for a reminder? (Instead of 30 
mins).
I found ReminderMinutesBeforeStart on MSDN and figure if I do 
appt.ReminderMinutesBeforeStart =90 that should do the trick right?

Thank you for any help. Outlook 2003 is being used in an Exchange Server 
environment. 

Also they requested that they use a shared calendar and that the reminder 
show up on 3 mailboxes. How do I reference a shared mailbox? I tried putting 
a reminder in a shared calendar and it tells me it's not in my mailbox but it 
reminded the other user successfully but did not remind me.

I'm going to use some of the code I found on here.

 Dim appt As Outlook.AppointmentItem

    Dim Location As String
    Dim Time As Variant
    Dim StartDate As Variant
    Dim Subject As String
    Dim Notes As String
    Dim Category As String

    Location = "Somewhere"
    Subject = "My Subject"
    Notes = "Some notes..."
    StartDate = #1/31/2006#
    Time = "1:05 pm"
    Category = "Business, Competition, Favorites"

    Set appt = Session.Folders.Item("Personal 
Folders").Folders.Item("Calendar").Items.Add

    appt.Location = Location
    appt.Subject = Subject
    appt.Body = Notes
    appt.Start = Format$(StartDate, "mm/dd/yy") & " " & Format$(Time, 
"hh:MM:ss am/pm")
    appt.Categories = Category
    appt.ReminderSet = True 
    appt.ReminderMinutesBeforeStart = ??  (Don't know what format it takes

    appt.Save

    Set appt = Nothing
date: Fri, 3 Oct 2008 11:54:01 -0700   author:   Mitch

RE: Is this possible?Shared calendar reminders between 3 people &remin   
I found this bit of code.
I assume if I replaced Public Folder path with say.

Calendar/Shared

It would load the secondary Shared Calendar (I made a second calendar for 
these reminders specifically)

' GetFolder - Gets a Public folder based on a string path - e.g. 
'If Folder name in English is
'Public Folders\All Public Folders\Europeen Workflow
'The just pass in "Europeen Workflow'

Public Function GetPublicFolder(strFolderPath)
   
    Dim colFolders 
    Dim objFolder 
    Dim arrFolders 
    Dim i 
    On Error Resume Next
    strFolderPath = Replace(strFolderPath, "/", "\")
    arrFolders = Split(strFolderPath, "\")
	
    Set objFolder = Application.Session.GetDefaultFolder(18)
    Set objFolder = objFolder.Folders.Item(arrFolders(0))
    If Not objFolder Is Nothing Then
        For i = 1 To UBound(arrFolders)
            Set colFolders = objFolder.Folders
            Set objFolder = Nothing
            Set objFolder = colFolders.Item(arrFolders(i))
            If objFolder Is Nothing Then
                Exit For
            End If
        Next
    End If
    Set GetPublicFolder = objFolder
    Set colFolders = Nothing
     Set objApp = Nothing
    Set objFolder = Nothing
End Function


But the question now is how do I get it to send reminders to 3 people whom 
have access to this?

"Mitch" wrote:

> Hi, I'm working on creating a macro to create 2 appointments, but it has to 
> send reminders to 3 specific people.
> 
> I have the code to create items in the Calendar so I can modify it and setup 
> the 2 appointments, but how do you get Outlook to use a shared calendar and 
> setup 3 reminders is beyond me right now. Also how do you substract a date 
> variable in VB? I'll be asking a user for a date, I then setup 2 reminders 90 
> days and 7 days before the 'specified date'. 
> 
> Also how do you specify the amount of time for a reminder? (Instead of 30 
> mins).
> I found ReminderMinutesBeforeStart on MSDN and figure if I do 
> appt.ReminderMinutesBeforeStart =90 that should do the trick right?
> 
> Thank you for any help. Outlook 2003 is being used in an Exchange Server 
> environment. 
> 
> Also they requested that they use a shared calendar and that the reminder 
> show up on 3 mailboxes. How do I reference a shared mailbox? I tried putting 
> a reminder in a shared calendar and it tells me it's not in my mailbox but it 
> reminded the other user successfully but did not remind me.
> 
> I'm going to use some of the code I found on here.
> 
>  Dim appt As Outlook.AppointmentItem
> 
>     Dim Location As String
>     Dim Time As Variant
>     Dim StartDate As Variant
>     Dim Subject As String
>     Dim Notes As String
>     Dim Category As String
> 
>     Location = "Somewhere"
>     Subject = "My Subject"
>     Notes = "Some notes..."
>     StartDate = #1/31/2006#
>     Time = "1:05 pm"
>     Category = "Business, Competition, Favorites"
> 
>     Set appt = Session.Folders.Item("Personal 
> Folders").Folders.Item("Calendar").Items.Add
> 
>     appt.Location = Location
>     appt.Subject = Subject
>     appt.Body = Notes
>     appt.Start = Format$(StartDate, "mm/dd/yy") & " " & Format$(Time, 
> "hh:MM:ss am/pm")
>     appt.Categories = Category
>     appt.ReminderSet = True 
>     appt.ReminderMinutesBeforeStart = ??  (Don't know what format it takes
> 
>     appt.Save
> 
>     Set appt = Nothing
> 
>
date: Fri, 3 Oct 2008 14:40:01 -0700   author:   Mitch

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us