Solved

All Day Event - Show time as busy, VBA

Posted on 2006-10-31
11
2,522 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
Comment Utility
"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
Comment Utility
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
Comment Utility
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
 
LVL 6

Author Comment

by:essaydave
Comment Utility
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
Comment Utility
Can you share the code you have now?
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 6

Author Comment

by:essaydave
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
You're welcome.  I'm happy I was able to help out.
0
 

Expert Comment

by:msgexpert
Comment Utility
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
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Create high volume marketing opportunities using email signatures with these top 10 DOs and DON'Ts of email signature marketing.
If you don't know how to downgrade, my instructions below should be helpful.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now