Microsoft KB Archive/311353

= OL2002: The CurrentView Method Does Not Work When You Use a Folder Homepage View =

Article ID: 311353

Article Last Modified on 4/17/2002

-

APPLIES TO


 * Microsoft Outlook 2002 Standard Edition

-



This article was previously published under Q311353



SYMPTOMS
When you access or modify the CurrentView method of the Outlook Object Model (OOM) while you are in the folder homepage view in Outlook 2002, you may receive the following error message:

Internet Explorer Script Error An error has occurred in the script on this page Invalid procedure call or argument: '.ActiveExplorer.CurrentView'



WORKAROUND
To work around this problem, use the Outlook View Control that is installed with Outlook 2002.

Include a hidden IFRAME as the target for the navigation because the Outlook Object Model security is turned on when you navigate to a JavaScript Uniform Resource Locator (URL) in the top-level window. If the appearance of the link is not an issue, you can leave out the HREF and the IFRAME. The following code is an example of how to use the Outlook View Control: Example Page

 var AppliOutlook = window.external.OutlookApplication; var FolderDossiers = AppliOutlook.ActiveExplorer.CurrentFolder.Folders(&quot;Repro&quot;);

function AfficheFolderView( ReproFolder, StrView ) {  var ViewCtl = document.all(&quot;viewctl&quot;);

// Use the ActiveX view control to update the destination folder's view ViewCtl.Folder = ReproFolder.FolderPath; ViewCtl.View = StrView; alert(ViewCtl.ActiveFolder);

// Change to the destination folder AppliOutlook.ActiveExplorer.CurrentFolder = ReproFolder;  }

 link to &quot;Folder&quot;





STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Additional query words: OL2K

Keywords: kberrmsg kbbug KB311353

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.