PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins PR_STORE_OFFLINE from Redemption

Reply

PR_STORE_OFFLINE from Redemption

 
Thread Tools Rate Thread
Old 02-07-2003, 12:21 AM   #1
Balch
Guest
 
Posts: n/a
Default PR_STORE_OFFLINE from Redemption


Hello,

I am trying to determine if Outlook is currently in Offline mode.
Looking at OutlookSpy it appears there is an PR_STORE_OFFLINE property
of the IMsgStore object that contains this information.

Can I access this info from the Redemption lib? If not, is there any
other way to determine if Outlook is in Offline mode.

Thanx in advance,

Jay Balch
  Reply With Quote
Old 02-07-2003, 02:12 PM   #2
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: PR_STORE_OFFLINE from Redemption

PR_STORE_OFFLINE can be accessed using Redemption, just as any other
field can be accessed. However you don't say which version of Outlook
you are using. That MAPI property is valid for Outlook 2000 and
earlier, for Outlook 2002 and later it's broken. For those versions
you would use Outlook.Session.Offline (a Boolean).

I test for Outlook.Version and depending on the version string
returned I branch in a Select Case block to see how I am going to
check for offline status.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


"Balch" <thebalch@yahoo.com> wrote in message
news:aabeecb4.0307011621.7951c2ee@posting.google.com...
> Hello,
>
> I am trying to determine if Outlook is currently in Offline mode.
> Looking at OutlookSpy it appears there is an PR_STORE_OFFLINE

property
> of the IMsgStore object that contains this information.
>
> Can I access this info from the Redemption lib? If not, is there

any
> other way to determine if Outlook is in Offline mode.
>
> Thanx in advance,
>
> Jay Balch



  Reply With Quote
Old 03-07-2003, 02:20 PM   #3
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: PR_STORE_OFFLINE from Redemption

At the present time Redemption doesn't provide InfoStores. Dmitry says
he's going to add them in version 3.4 which he's starting development
on.

I use CDO for that, I get the default InfoStore as a global in my code
as well as the Outlook version as a long (9 for Outlook 2000, 10 for
2002 and 11 for 2003) and use code like the following (this is from a
COM addin so I also have a global referencing the Application object
passed to the COM addin in the On_Connection event):

Private Function UserOnline() As Boolean
Dim objOL As Object

On Error Resume Next

UserOnline = False

If g_lngVersion >= 10 Then
Set objOL = g_objOL
UserOnline = Not (objOL.Session.Offline)
Else
If InStr(1, g_objInfoStore.Fields(CdoPR_PROVIDER_DISPLAY), _
"Microsoft Exchange", vbTextCompare) > 0 Then

'Check if store is in offline mode
UserOnline = Not (g_objInfoStore.Fields(PR_STORE_OFFLINE).Value)
End If
End If

Set objOL = Nothing
End Function

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


"Balch" <thebalch@yahoo.com> wrote in message
news:aabeecb4.0307021522.7a2c1183@posting.google.com...
> Thanks for getting back to me Ken,
>
> I need to be able to detect the offline flag for all Outlook 2000

and
> beyond.
>
> The Outlook.Session.Offline works great in Outlook XP but I am still
> having trouble figuring out how to get the PR_STORE_OFFLINE

property.
> When I use OutlookSpy it displays the PR_STORE_OFFLINE property in

the
> IMsgStore. I understand you can use the Fields collection or the
> HrGetOneProp function to retrieve outlook properties. What I am
> missing is which object corresponds to the message store. When I

read
> the following posting it leads me to believe that Redemption does

not
> expose the IMsgStore object.
>
>

http://groups.google.com/groups?hl=...TF-8&threadm=eu
9zkTlFDHA.1016%40TK2MSFTNGP10.phx.gbl&rnum=5&prev=/groups%3Fnum%3D100%
26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26q%3Dredemption%2Bimsgsto
re%2B%26btnG%3DGoogle%2BSearch
>
>
> Please let me know if I am missing something or there is another way
> to detect if Outlook is in offline mode in Outlook 2000.
>
> Thanx again,
>
> Jay Balch



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off