Workaround options?

H

Huw

Firstly, sorry for cross-posting, but I was unsure which newsgroup had the
best chance of being able to answer this question.

I've an addin that adds a button to a toolbar. When the button is pressed,
I want to change the right hand side view to be a web page. The way I
currently do it is to create a folder under the deleted items folder, and
then set the webviewurl. I then display this folder and delete it.

This works great on 97/98 and 2000, but on 2002 and 2003 it gives slightly
undesirable behaviour. Once the webpage is loaded, I often have to click
twice on a folder on the left hand side for the view to return to the normal
message view. Sometimes on 2003, the folder does not get deleted from the
delete items folder when I call the delete method on it.

I was wondering if anyone has a cleaner solution the problem I have above,
instead of creating a folder and deleting it.

Many thanks,
 
K

Ken Slovak - [MVP - Outlook]

Why not just set the folder home page for the current folder instead
of creating a new folder?
 
H

Huw

Thanks ken,

The problem is that I need the following behaviour. If the user is on the
inbox folder, pressing the button will navigate to the web page, and then
clicking on the inbox folder node will return the view to the normal message
view.

I tried doing something along the lines of...

Dim s As String
Dim b As Boolean

s = Application.ActiveExplorer.CurrentFolder.WebViewURL
b = Application.ActiveExplorer.CurrentFolder.WebViewOn

Application.ActiveExplorer.CurrentFolder.WebViewURL =
"file:C:\MyFile.htm"
Application.ActiveExplorer.CurrentFolder.WebViewOn = True
Application.ActiveExplorer.SelectFolder
Application.ActiveExplorer.CurrentFolder

DoEvents

'Reset the vaules
Application.ActiveExplorer.CurrentFolder.WebViewOn = b
Application.ActiveExplorer.CurrentFolder.WebViewURL = s

but this doesnt behave correctly, I need to click another folder before the
inbox to return the view to the normal one!

Any other ideas?
 
K

Ken Slovak - [MVP - Outlook]

I think you would have to switch folders and back again to force
Outlook to refresh it's display of the folder.
 

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