?
Solved

Automatically move weekend appointments to Monday or Friday

Posted on 2008-10-13
9
Medium Priority
?
1,039 Views
Last Modified: 2012-05-05
Is there a way to automatically move an Outlook appointment to either a Monday of Friday if the recurrence falls on a Sunday or Saturday respectively?

For instance, I have a meeting that is scheduled for the 20th of each month.  However, if the 20th is on a Saturday, we have the meeting on the preceding Friday and if it falls on a Sunday we have it on the following Monday.  I would like Outlook to follow this same logic.
0
Comment
Question by:shtaffa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 22703655
Hi, shtaffa.

Outlook has no means of doing that using a recurring appointment.  You'd have to schedule the appointments individually.
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 22703690
Hello David,

I was thinking that perhaps there would be a VBA approach to test each recurrence for happening on a weekend,
and adjust the date accordingly.  Of course, I did not feel confident enough in my Outlook VBA skills to actually
attempt it...

:)

Regards,

Patrick
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22705500
Hi, Patrick.

Interesting idea.  Generate the appointments, then go through them all looking for ones falling on a weekend.  Adjust those that are.  That might work, but I see a couple of potential problems.  First, if the user ever edited the series, then I'm pretty sure Outlook would reset the appointments to the original day.  The user would have to run the script again to readjust them.  Second, Outlook doesn't generate all the items at once for an open-ended appointment.  It might be necessary to run the script periodically to adjust the dates.

All things considered I don't think a recurring appointment is the best approach.  I think a better approach is to use a script to simulate a recurring appointment.  Create an appointment, then run a script to make duplicates of that appointment at the desired interval.  The script would have the intelligence necessary to test the day the appointment falls on and adjust it accordingly.  A second script could propagate changes to the base appointment to its clones, and a third script could delete all occurrences of the appointment.  None of the scripts would be very complicated.  
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 22706699
David,

On balance, I think you're right--create each instance independently (scripting that would be easy), and don't
try to do it on a recurring basis...

Regards,

Patrick
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22706828
shtaffa,

Do you want to give a scripted solution a shot?
0
 

Author Comment

by:shtaffa
ID: 22706866
It seems like that would be kind of a pain.  I was hoping for more of a "click on this, click on this and you're done, you idiot" type answer.
0
 
LVL 76

Accepted Solution

by:
David Lee earned 1000 total points
ID: 22706916
Sorry, Outlook just isn't built for doing this.  
0
 
LVL 93

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 1000 total points
ID: 22709339
shtaffa,

Here's a start.  No doubt David can make it a bit better, but it's pretty easy to implement.

Regards,

Patrick
Sub MakeAppts()
    
    Dim meet As AppointmentItem
    Dim StDate As Date
    Dim EndDate As Date
    Dim UseDate As Date
        
    StDate = #10/20/2008 9:00:00 AM#
    EndDate = #1/20/2009 9:00:00 AM#
    UseDate = StDate
    
    Do While UseDate <= EndDate
        Set meet = CreateItem(olAppointmentItem)
        With meet
            Select Case Weekday(UseDate, vbMonday)
                Case 1 To 5: .Start = UseDate
                Case 6: .Start = UseDate - 1
                Case 7: .Start = UseDate + 1
            End Select
            .End = UseDate + TimeSerial(1, 0, 0)
            .Subject = "subject"
            With .Recipients
                .Add "x@y.com"
                .Add "y@z.com"
            End With
            .Save
            .Send
        End With
        UseDate = DateAdd("m", 1, UseDate)
    Loop
    
    MsgBox "Done"
    
End Sub

Open in new window

0
 

Author Closing Comment

by:shtaffa
ID: 31505594
I have closed this issue and assigned the points to be split between you both.  Thanks for taking the time to think this through.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

743 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