Ken,
Here's the Read(), PropertyChange() and Write() portions plus a couple of
functions used .
Dim mp2
Dim strREQ
Dim strOPT
Dim strRES
dim acatitems
dim acatavail
dim acatlist
dim aportitems
dim aportavail
dim aportlist
dim atempport
dim atempcat
dim oldstart
dim oldend
Function Item_Read()
MSGBOX "START Item_Read()"
SET MP2 = NOTHING
strREQ = Item.RequiredAttendees
strOPT = Item.OptionalAttendees
strRES = Item.Resources
MSGBOX "END Item_Read()"
End Function
Sub Item_PropertyChange(ByVal Name)
ON ERROR RESUME NEXT
if name = "ReminderSet" then
msgbox "Changing Reminder Setting"
exit sub
end if
if meetingstatus = 5 then
msgbox "MeetingStatus = 5 detected - change ignored"
exit sub
end if
if name = "IsRecurring" then
msgbox "This form may not be used to create reccurring bookings"
item.clearrecurrencepattern
exit sub
end if
if mp2 is nothing then createmp2()
Set RoomPage = GetInspector.ModifiedFormPages("Rooms and Equipment")
Set RoomListBox = RoomPage.RoomListBox
Set EquipListBox = RoomPage.EquipListBox
set sitelistbox = Roompage.SiteListBox
set deptlistbox = roompage.deptlistbox
set bookref = roompage.bookref
if billinginformation <> "" THEN
select case name
case "IsRecurring"
msgbox "This form may not be used to create reccurring bookings"
item.clearrecurrencepattern
case "End"
DoChange(name)
case "Subject"
DoChange(name)
end select
end if
End Sub
Function Item_Write()
msgbox "Item_Write"
IF BILLINGINFORMATION <> "" THEN
For Each oRecip in Item.Recipients
If oRecip.Resolved = False Then recipresolved=false
Next
If strREQ <> Item.RequiredAttendees then
strREQ = Item.RequiredAttendees
'msgbox "strREQ Changed to: " & strREQ
DoChange("RequiredAttendees")
End If
If strOPT <> Item.OptionalAttendees then
strOPT = Item.OptionalAttendees
'msgbox "strOPT Changed to: " & strOPT
DoChange("OptionalAttendees")
End If
If strRES <> Item.Resources then
strRES = Item.Resources
'msgbox "strRES Changed to: " & strRES
dochange("Item.resources")
End If
if recipresolved=false then
' msgbox "unresolved recipients"
end if
END IF
End Function
sub CreateMP2()
'Load Automation Server to access SQLServer DB
on error resume next
set mp2 = createobject("MP2AutoServer.Application")
if mp2 is nothing then
msgbox "Unable to start Automation Server"
exit sub
end if
end sub
Sub DoChange(cstring)
'msgbox "Changing "+cstring
Set RoomPage = GetInspector.ModifiedFormPages("Rooms and Equipment")
cstart = Formatdatetime([start],2)
cend = formatdatetime([end],2)
cfrom = formatdatetime([start],4)
cto = formatdatetime([end],4)
if cfrom = cto then
msgbox "Invalid time range - Start and End cannot be the same"
item.start = oldstart
item.end = oldend
exit sub
end if
'npeople = recipients.count
npeople = mp2.getpeople(billinginformation)
CORG=SESSION.CURRENTUSER
'corg="Jeff Mowatt"
dim abook(20)
dim apeople(99)
for n=1 to recipients.count
set orecip = recipients.item(n)
apeople(n-1) = orecip.name
next
npeople=mp2.getpeople(billinginformation)
if npeople = 0 then npeople=recipients.count
asite=roompage.sitelistbox.list
adept=roompage.deptlistbox.list
arooms=roompage.roomlistbox.list
aequip=roompage.equiplistbox.list
if mp2 is nothing then exit sub
nresult=mp2.TXNAmend(corg,BILLINGINFORMATION,cstart,cend,cfrom,cto,npeople,a
people,abook,adept,asite,arooms,aequip)
end sub
----------------------------------------- end -------------------
The crash occurs immediately after the PropertyChange detects the
modification of ReminderSet and the Write() never happens.
I've done everything I can think of to make sure Outlook is not corrupt, ie
cleanreminders, repair office installation.
The Outlook Security Admin feature is installed on my test network but the
abort still happens at a customer site where it isn't installed.
Regards,
Jeff