Microsoft KB Archive/226699

= PPT2000: Inserted Script Runs Twice When Previewed =

Article ID: 226699

Article Last Modified on 6/17/2005

-

APPLIES TO


 * Microsoft PowerPoint 2000 Standard Edition

-



This article was previously published under Q226699



SYMPTOMS
If you edit script in a Microsoft PowerPoint presentation, the script may not function the way you expect. Specifically, JScript and Visual Basic Scripting Edition (VB Script) code may execute twice when you view it in Internet Explorer.



CAUSE
This behavior is caused by the translation of a PowerPoint presentation with multiple slides into XML. Each slide object in the Project Explorer is read twice. It is read once for Slide view and once for Notes view. Script that is not customized for a specific view will execute each time the slide object is read.

NOTE: Single slide presentations are only read for Slide View.



MORE INFORMATION
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. IMPORTANT: The script generated by a Microsoft PowerPoint presentation is highly technical. Editing this script is recommended only for developers and programmers with extensive knowledge of both product and scripting language. Improper editing of script generated by Microsoft PowerPoint can produce unwanted results, including permanent loss of data.

You can customize your code to run for only one type of view by basing your code on the following examples. The desired code is enclosed within an IF THEN statement that tests for the condition IsNts (for the Notes view) or IsSld (for the Slide view).

Example One: Visual Basic Script
This example generates a message box that states "Hello World!" each time you navigate to slide one by inserting code immediately before the tag in the Slide1 Object in the Project Explorer.

Use the following code example to properly insert the script. 

Example Two: JScript
This example generates a message box that states "Hello World!" each time you navigate to slide one by inserting code immediately before the tag in the Slide1 Object in the Project Explorer

Use the following code example to properly insert the script.

Additional query words: PPT2K PPT2000 PPT POWERPNT 2000 PPT9 9.0 double duplicate respawn

Keywords: kbprb KB226699

-

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

© Microsoft Corporation. All rights reserved.