Solved

All Day Event - Show time as busy, VBA

Posted on 2006-10-31
11
2,531 Views
Last Modified: 2010-05-18
Hi guys

I've been bashing my head against this wall all day, hopefully someone else will know of an easy way.  

In Outlook 2003, when you tick the "All day event" box, the "Show time as" dropdown changes from Busy to Free.  We would like to have the time remain as Busy when the box is ticked, but be able to be changed to Free.  Desired behaviour is:  Create new appointment, time is Busy.  Tick All Day Event, time remains Busy.  Change time to Free, All Day Event remains ticked.

I know there'll be some VBA involved, but my pathetic attempts seem to lock the dropdown at Busy, remove the checkmark, and various other unwanted effects.  I'm not sure if I'm putting the code in the wrong place, or using the wrong properties, or something like that, but would really appreciate a pointer in the right direction.  

Thanks
Dave

0
Comment
Question by:essaydave
11 Comments
 
LVL 16

Expert Comment

by:dhsindy
ID: 17843766
"All day event" box, the "Show time as" dropdown changes from Busy to Free.  Exactly, just change it back to Busy and it will stay Busy when you save and close.
0
 
LVL 6

Author Comment

by:essaydave
ID: 17843852
Ahh, yeah.  Sorry, I should have been a little clearer.  I know that we can do that, but we would like for the default value to be busy, with users changing it to free afterwards.  

The reason is, we have a lot of users that set up all day events, and are in fact out of the office, but their time is showing as Free.  We have recently deployed Live Communications Server and Communicator 2005, and have a requirement for the Communicator client to show the time as Busy when a user creates an all day event.  
0
 
LVL 76

Expert Comment

by:David Lee
ID: 17845083
Hi essaydave,

I haven't thought this through completely, but I see two possible ways of handling this.  One way is to create a custom Appointment form.  The big drawbacks of doing that are that folks will have to have the form and remember to use it.  On the positive side, the code will all go in the form.  The second way is to trap the ItemSave event for the calendar folder and make the adjustments in it.  The downside there is that you'll have to install that code on everyone's computer.  If you have many staff, then that's going to be a pain.  The positive side of this approach is that you don't have to modify any forms and the code is a bit simpler in my opinion.

You mention that you've already started writing some VBA, so a good starting point is for you to describe how you're approaching this.

Cheers!
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 6

Author Comment

by:essaydave
ID: 17856590
Yep, that's what we're looking at doing.  We're a pretty small shop, about 40 users, and we'd be looking at setting the form to the default on their Calendar folder, by publishing the form to the Organisational Forms Library, then setting it on each PC using the "When posting to this folder, use" dropdown in the calendar properties.  

With regards to the VBA, well, its kinda hopeless :)  Like I said, its not really working - I think I've been putting the code in the wrong place, or something like that.  I've tried using the AllDayEvent onclick, but that doesn't seem to be firing properly with what I'm doing, so that's what I'd like a hand with.  I'm pretty sure, I can get it going, if I just knew what to put where!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 17856888
Can you share the code you have now?
0
 
LVL 6

Author Comment

by:essaydave
ID: 17858250
Hehe, ok.  

Its nothing much at all:

-=-=-=-=-

Function CheckBox1_Click()

      If Item.AllDayEvent = True Then
            Item.BusyStatus = "Busy"
      End If

End Function

-=-=-=-=-

Checkbox1 is the All Day event field that I've placed on P2 in the form design.  I followed this:

http://www.windowsitpro.com/MicrosoftExchangeOutlook/Article/ArticleID/37535/37535.html

to set the initial values, and after seeing that the checkbox/dropdown on P2 of the form were modified according to the box being checked/unchecked on the main page of the form, I though I could use that to set the values, but obviously not.  

I think that the action should be firing when the box is clicked, and this will also have the effect that when the box is unchecked it will revert to Busy anyway.  
0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 17875309
This is the code you need to keep BusyStatus set to Busy even when All Day Event is selected.

Sub Item_PropertyChange(ByVal Name)
    If Name = "AllDayEvent" Then
        Item.BusyStatus = 2
    End If
End Sub
0
 
LVL 6

Author Comment

by:essaydave
ID: 17880235
Perfect!  Thanks for that BlueDevilFan.  

I used a Function/End  Function, instead of the Sub, and its working perfectly.  We've published it to the Organisational Forms Library, and are rolling it out to users as the default meeting request form.  

0
 
LVL 76

Expert Comment

by:David Lee
ID: 17880248
You're welcome.  I'm happy I was able to help out.
0
 

Expert Comment

by:msgexpert
ID: 34240838
Hi essaydave and BlueDevilFan,

I know this post was submitted 4 years ago, but I now have some people in my organization asking for this change, so I was wondering if you guys could possibly tell me where I need to insert that VBA script?

Thanks so much.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 34244424
Hi, msgexpert.

That code isn't VBA, it's VBScript.  It goes in a custom form.  Assuming that you've created a custom form, then you'd open the form in the form editor, open the code editor, and insert the code.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

820 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