SetPref problem in VBScript folder home page

M

Michael

I'm trying to use GetPref and SetPref to preserve state in a folder home
page in Outlook. I'm essentially trying to implement the example from Randy
Byrne's "Build Applications with Microsoft Outlook Version 2002", page 738.

The problem appears to be in the SetPref call. The error returned is
"Object doesn't support this property or method: 'Window.external.SetPref'".
Here's some example code:

<html>
<head>

<script language="vbscript">

Sub Window_onload()
alert(Window.external.GetPref("test"))
End Sub

Sub Window_OnUnload()
alert(Window.external.GetPref("test"))
'The SetPref line below don't seem to work...
Window.external.SetPref("test")="This is a test."
End Sub

</script>
..
..
..

I'm running Outlook 2003 SP1 on Windows XP SP2. I do not want to use
cookies to preserve state (page 739 in the book) because the browser can
block cookies and I would like to be able to change the value in C# code
outside of the home page.

Michael
 

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