Create the following file and put it in c:\temp.htm (or something)
<html>
<head>
<script>
function test() {
var App = new ActiveXObject('PowerPoint.Application')
App.Run("PPTupload!addQuestion()")
}
</script>
</head>
<body>
<input type="button" value="test" onclick="test()"
</body>
</html>
In the add-in called PPTupload create a subroutine called addQuestion:
public sub addQuestion()
call msgbox("here")
end sub
Add a webbrowser control to the user form and add
webrowser1.navigate2("file://c:\temp.htm")
When you click the button, you should see "here".
sr
"Steve Rindsberg" wrote:
> If you can supply some example HTML that includes the javascript chirag sent and
> a button to click to invoke it (I'm hopeless w/ javascript) I'd be happy to see
> if I can get it working with PPT.
>
> One thing to consider first: I'm pretty sure the add-in name it's looking for is
> the one that appears in the Add-ins dialog box in PPT. In 2007 that'd be found
> at the bottom of:
>
> Office Button | PowerPoint Options | Add-ins | Manage: PowerPoint Add-ins |
> Click Go
>
> In article <5CE6CBF2-2FF2-44CC-8CF6-(E-Mail Removed)>, SteveR wrote:
> > Chirag, That made a lot of sense, but still the exact same error. With
> > CreateGuide being the name of the add-in, I'm using:
> >
> > App.Run("CreateGuide!addQuestion") and tried
> > App.Run("CreateGuide!addQuestion()")
> >
> > This is PPT 2007, and it feels like it's a completely different product from
> > everything before it. Could there be some syntax difference in 2007 that
> > have changed from everything else?
> >
> > sr
> >
> > "Chirag" wrote:
> >
> > > In that case, you need to qualify the subroutine reference with the add-in
> > > name. If the sub routine name is "addQuestion" and add-in name is "AddIn",
> > > you would need to execute
> > > App.Run("AddIn!addQuestion")
> > > in your code instead of App.Run("addQuestion").
> > >
> > > - Chirag
> > >
> > > PowerShow - View multiple PowerPoint slide shows simultaneously
> > > http://officeone.mvps.org/powershow/powershow.html
> > >
> > > "SteveR" <(E-Mail Removed)> wrote in message
> > > news:54EFEFE7-17E3-48AE-B4EE-(E-Mail Removed)...
> > > > Steve, thanks again for the reply.
> > > >
> > > > Maybe I wan't clear enough in my opening question. It is an add-in and
> > > > it's actually the add-in that creates the content of the webbrowser
> > > > control
> > > > with the Javascript included in it. The add-in displays the userForm and
> > > > when the user changes a combobox in the webbrowser control, the combobox's
> > > > onChange function should call the subroutine in the add-in. So, the
> > > > add-in
> > > > is definitely running when the Javascript is called.
> > > >
> > > > sr
> > >
> > >
>
>
>
>