P
Pierre Scerri
I am using a form in Outlook 2003 that has 3 option buttons.
Button 1 changes the view to Calendar. Buttons 2 and 3 switch to 1 of 2
folders in 'Notes'. Each of the 2 folders in 'Notes' points to a different
website.
Button 2 is the default. If i switch using Button 3 and back to Button 2
all is well. If i switch using button 1 (calendar view) and back to button 2,
i get a permission denied error. The code that is activated when i click
buton 2 is:
Private Sub OptCWP_Click()
If MyFolder Is Nothing Then Set MyFolder =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderNotes).Folders("Crew Web Portal")
With Application.ActiveExplorer
Set .CurrentFolder = MyFolder
Do While .HTMLDocument.readyState <> "complete": DoEvents: Loop
If InStr(1, .HTMLDocument.Location, "CWPLogin") Then...
The code stops at this line with the permission denied error. Clicking past
the error and pressing F5, execution continues normally.
I suspect that the webpage hasn't fully loaded even if i've put a loop to
wait for it. Is this the correct way to wait for the page to load?
Thank you
PS Can i access the HTNL contents of a folder that points to a webpage using
Getexplorer without actually displaying the folder in a separate window?
Button 1 changes the view to Calendar. Buttons 2 and 3 switch to 1 of 2
folders in 'Notes'. Each of the 2 folders in 'Notes' points to a different
website.
Button 2 is the default. If i switch using Button 3 and back to Button 2
all is well. If i switch using button 1 (calendar view) and back to button 2,
i get a permission denied error. The code that is activated when i click
buton 2 is:
Private Sub OptCWP_Click()
If MyFolder Is Nothing Then Set MyFolder =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderNotes).Folders("Crew Web Portal")
With Application.ActiveExplorer
Set .CurrentFolder = MyFolder
Do While .HTMLDocument.readyState <> "complete": DoEvents: Loop
If InStr(1, .HTMLDocument.Location, "CWPLogin") Then...
The code stops at this line with the permission denied error. Clicking past
the error and pressing F5, execution continues normally.
I suspect that the webpage hasn't fully loaded even if i've put a loop to
wait for it. Is this the correct way to wait for the page to load?
Thank you
PS Can i access the HTNL contents of a folder that points to a webpage using
Getexplorer without actually displaying the folder in a separate window?