what is wrong with this outlook vba code ??

P

PGT

In my previous posting the code didnt start add new lines, i put in now extra linebreaks

My problem why does this code not work in outloo
categories are not set, vba doesnt seam to run at all, security is set to lowest, and i've placed the code in "this outlook session" (category will be set to Holiday" if the subject contains vrij

---------------------------------

Dim WithEvents colRDVItems As Item


Private Sub Application_Startup(

Dim NS As Outlook.NameSpac

Set NS = Application.GetNamespace("MAPI"

Set colRDVItems = NS.GetDefaultFolder(olFolderCalendar).Item

Set NS = Nothin

End Su


Private Sub colRDVItems_ItemAdd(ByVal Item As Object

'Item.BusyStatu

OutOfOffice =

bussy =

mightattend = 1 'tentative (voorlopig

available =

'-------------------------------------------------------


If Item.Class = olAppointment The

If InStr(LCase(Item.Subject), "vrij") > 1 The

AddCat Item, "Holiday

Item.Sav

Item.BusyStatus = OutOfOffic

End I

End I

End Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top