[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

All Day Event - Show time as busy, VBA

Posted on 2006-10-31
11
Medium Priority
?
2,553 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
[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
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
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…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

656 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