Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2569
  • Last Modified:

All Day Event - Show time as busy, VBA

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
essaydave
Asked:
essaydave
1 Solution
 
dhsindyRetiredCommented:
"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
 
essaydaveAuthor Commented:
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
 
David LeeCommented:
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
Industry Leaders: 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!

 
essaydaveAuthor Commented:
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
 
David LeeCommented:
Can you share the code you have now?
0
 
essaydaveAuthor Commented:
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
 
David LeeCommented:
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
 
essaydaveAuthor Commented:
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
 
David LeeCommented:
You're welcome.  I'm happy I was able to help out.
0
 
msgexpertCommented:
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
 
David LeeCommented:
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now