# Display UserForm on Open in ppt 2007



## peteyb (Apr 20, 2007)

Hi All

When using MS Word 2007 I can put the following code in the ThisDocument areas in VB, which displays the userForm when the document is opended.


```
Private Sub Document_Open()
    UserForm.Show
End Sub
```
Why wont this work in Powerpoint? Is it possible for a userForm to open in Powerpoint whent he presentation is opended?


----------



## David M58 (May 20, 2008)

PowerPoint does not support a "document open" or "auto open" event that is directly accessible without loading an add-in.

One thing you could do in PowerPoint 2007 is create a desktop shortcut that opens the presentation and runs a macro which could open a UserForm. The shortcut target would be something like:

"C:\Program Files\Microsoft Office\Office12\POWERPNT.EXE" /M "C:\Presentations\Petey_B.pptm" "FormOpen"

In the above example, "FormOpen" is the name of a macro.


----------



## peteyb (Apr 20, 2007)

I have found an alternative solution, in that the user will simply press Alt+F8 then run the macro.

Although I will keep what you said in mind for any future ppt's.


----------

