home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 March
/
CHIPCD_3_98.iso
/
software
/
testsoft
/
exchange
/
webdata
/
usa
/
lib
/
store.inc
< prev
Wrap
Text File
|
1997-08-25
|
4KB
|
134 lines
<%
'!--Microsoft Outlook Web Access-->
'!--Store.inc - Open functions-->
'!--Copyright (c) Microsoft Corporation 1993-1997. All rights reserved.-->
'===CONTENTS========================
' OpenPrivateStore
' OpenPublicStore
' OpenAllStores
' OpenMessage
' OpenFolder
'========================
'=======================
' OpenPrivateStore
'
' Returns: Sets bstrObjPrivateStore
'=======================
Sub OpenPrivateStore
On Error Resume Next
Dim objPrivateStore
If Session(bstrObjPrivateStore) Is Nothing Then
Err.Clear
If (Session(bstrAuthenticated)) Then
szPrivateID = objOMSession.Inbox.StoreID
Set objPrivateStore = objOMSession.GetInfoStore(szPrivateID)
If (Err.Number <> 0) Then
ReportError1 L_errFailedToGetInbox_ErrorMessage
Else
Set Session(bstrObjPrivateStore) = objPrivateStore
Set Session(bstrDeletedItemsID) = objPrivateStore.Fields.Item(ActMsgPR_IPM_WASTEBASKET_ENTRYID)
End If
End If
End If
Set objPrivateStore = Nothing
End Sub
'=======================
' OpenPublicStore
'
' Returns: Sets bstrObjPublicStore
'=======================
Sub OpenPublicStore
On Error Resume Next
If Session(bstrObjPublicStore) Is Nothing Then
Err.Clear
Set objStores = objOMSession.InfoStores
If (Err.Number <> 0) Then
ReportError1 L_errFailGetStores_ErrorMessage
Else
For i = 1 To objStores.Count
Set objStore = objStores.Item(i)
szID = objStore.Fields.Item(ActMsgPR_IPM_PUBLIC_FOLDERS_ENTRYID)
lMask = objStore.Fields.Item(ActMsgPR_STORE_SUPPORT_MASK)
Err.Clear
If lMask And ActMsgSTORE_PUBLIC_FOLDERS Then ' STORE_PUBLIC_FOLDERS
Set Session(bstrObjPublicStore) = objStore
Session(bstrPublicStoreID) = objStore.ID
Session(bstrPublicStoreRootID) = szID
Session(bstrPublicStoreEntryID) = objStore.Fields.Item(ActMsgPR_STORE_ENTRYID)
Exit For
End If
Next
End If
End If
End Sub
'=======================
' OpenAllStores
'
' side effect: opens all available message stores
'=======================
Sub OpenAllStores
On Error Resume Next
OpenPrivateStore
OpenPublicStore
End Sub
'=======================
' OpenMessage
'
' Returns: message object in private or public store
'=======================
Public Function OpenMessage(szMessageID)
On Error Resume Next
Set OpenMessage = Nothing
Set objMessage = objOMSession.GetMessage(szMessageID, NULL)
If objMessage Is Nothing Or IsEmpty(objMessage.ID) Then
Err.Clear
OpenAllStores
Set objMessage = objOMSession.GetMessage(szMessageID, NULL)
End If
Set OpenMessage = objMessage
End Function
'=======================
' OpenFolder
'
' Returns: folder object in private or public store
'=======================
Public Function OpenFolder(szFolderID)
On Error Resume Next
Set OpenFolder = Nothing
Set objOpenFolder = objOMSession.GetFolder(szFolderID, NULL)
If objOpenFolder Is Nothing Then
Err.Clear
OpenAllStores
Set objOpenFolder = objOMSession.GetFolder(szFolderID, NULL)
ElseIf IsEmpty(objOpenFolder.ID) Then
Err.Clear
OpenAllStores
Set objOpenFolder = objOMSession.GetFolder(szFolderID, NULL)
End If
Set OpenFolder = objOpenFolder
End Function
%>