What am I trying to do? 
Author Message
 What am I trying to do?

I have done some testing on creating VBA addins for PowerPoint.  I created a
limited addin that has a menu item that when selected runs a macro.  The
macro adds a slide and then some text.  What I want to do is create a web
browser control( menu item? ) that a user can add to a slide, size it and
set the URL property.  How does one do this? Add a menu item on the tool bar
that uses user forms to collect the properties and then insert a WebBrowser1
object on the slide?

TIA



Wed, 29 Sep 2004 04:58:02 GMT  
 What am I trying to do?
Have a look at http://www.mvps.org/skp/

I think Shyam Pillai's already got an addin that does what you're after.  I
don't know whether it's commercial or free, or whether it includes source
code, but I expect it'd be worth a look either way.  He may also have code
posted on the site.

--
If you attach a file, I'll never see your message.  Please don't.
Steve Rindsberg, PowerPoint MVP

Get the PPT FAQs at http://www.rdpslides.com/pptfaq/
RnR PPTools - http://www.pptools.com
------

Quote:
> I have done some testing on creating VBA addins for PowerPoint.  I created
a
> limited addin that has a menu item that when selected runs a macro.  The
> macro adds a slide and then some text.  What I want to do is create a web
> browser control( menu item? ) that a user can add to a slide, size it and
> set the URL property.  How does one do this? Add a menu item on the tool
bar
> that uses user forms to collect the properties and then insert a
WebBrowser1
> object on the slide?

> TIA



Wed, 29 Sep 2004 23:05:07 GMT  
 What am I trying to do?
I have tested using Shyam's Liveweb addin and it does do what I want.  I
have other things like that I need to do so I am trying to learn how to code
these types of addins.  It is a case of trying to figure out where to start.
I write C++ and VB software so I think I have a leg up.

Thanks Steve.  I'll catch you trolling in the PPT NG.


Quote:
> Have a look at http://www.mvps.org/skp/

> I think Shyam Pillai's already got an addin that does what you're after.
I
> don't know whether it's commercial or free, or whether it includes source
> code, but I expect it'd be worth a look either way.  He may also have code
> posted on the site.

> --
> If you attach a file, I'll never see your message.  Please don't.
> Steve Rindsberg, PowerPoint MVP

> Get the PPT FAQs at http://www.rdpslides.com/pptfaq/
> RnR PPTools - http://www.pptools.com
> ------


> > I have done some testing on creating VBA addins for PowerPoint.  I
created
> a
> > limited addin that has a menu item that when selected runs a macro.  The
> > macro adds a slide and then some text.  What I want to do is create a
web
> > browser control( menu item? ) that a user can add to a slide, size it
and
> > set the URL property.  How does one do this? Add a menu item on the tool
> bar
> > that uses user forms to collect the properties and then insert a
> WebBrowser1
> > object on the slide?

> > TIA



Fri, 01 Oct 2004 20:46:45 GMT  
 What am I trying to do?
Hi Mike,

I don't quite understand what you are after. You can create userform and ask
the user for the URL. Then you create an instance of WebBrowser control on
the slide with some code like:

Set Shp = ActivePresentation.Slides(1).Shapes.Add( _
    ClassName:="Shell.Explorer")

Set the dimensions of the shape and use Navigate method of the web browser
object. Something like:

Shp.OLEFormat.Object.Navigate URL

would work. Were you looking for the appropriate methods to call?

- Chirag
  http://officerone.tripod.com/


Quote:
> I have done some testing on creating VBA addins for PowerPoint.  I created
a
> limited addin that has a menu item that when selected runs a macro.  The
> macro adds a slide and then some text.  What I want to do is create a web
> browser control( menu item? ) that a user can add to a slide, size it and
> set the URL property.  How does one do this? Add a menu item on the tool
bar
> that uses user forms to collect the properties and then insert a
WebBrowser1
> object on the slide?

> TIA



Sat, 02 Oct 2004 01:20:56 GMT  
 What am I trying to do?
That is what I am trying to do.  I am also trying to understand how to build
and implement an add in.  I am trying to do a simple COM add in dll to
insert an item on the tools menu. Then I was going to have the menu item
display a user form like you said and add a web browser control to a slide.
I user the Visual Basic Editor with PPT (2002) and created an Add in
project.  I created the dll and when I start PowerPoint it is marked with an
X in the COM add ins dialog but my item is not added to the menu.  It seems
as if I don't get the Auto_Open() event.  I have the designer Initial Load
Behavior set to startup.

Do I need to do something further to get my item added to the menu?

Code snippet:

Sub ShowForm()
    MsgBox "I made it!"
End Sub
Sub Auto_Open()

    Dim NewControl As CommandBarControl

    ' Store an object reference to a command bar.
    Dim ToolsMenu As CommandBars

    ' Figure out where to place the menu choice.
    Set ToolsMenu = Application.CommandBars

    ' Create the menu choice. The choice is created in the first
    ' position in the Tools menu.
    Set NewControl = ToolsMenu("Tools").Controls.Add _
                     (Type:=msoControlButton, _
                      Before:=1)

    ' Name the command.
    NewControl.Caption = "Show Form"

    ' Connect the menu choice to your macro. The OnAction property
    ' should be set to the name of your macro.
    NewControl.OnAction = "ShowForm"

   End Sub

Sub Auto_Close()

   Dim oControl As CommandBarControl
   Dim ToolsMenu As CommandBars

   ' Get an object reference to a command bar.
   Set ToolsMenu = Application.CommandBars

   ' Loop through the commands on the tools menu.
   For Each oControl In ToolsMenu("Tools").Controls

         ' Check to see whether the comand exists.
         If oControl.Caption = "Show Form" Then

           ' Check to see whether action setting is set to ChangeView.
           If oControl.OnAction = "ShowForm" Then

               ' Remove the command from the menu.
               oControl.Delete
            End If
         End If
   Next oControl
End Sub

TIA


Quote:
> Hi Mike,

> I don't quite understand what you are after. You can create userform and
ask
> the user for the URL. Then you create an instance of WebBrowser control on
> the slide with some code like:

> Set Shp = ActivePresentation.Slides(1).Shapes.Add( _
>     ClassName:="Shell.Explorer")

> Set the dimensions of the shape and use Navigate method of the web browser
> object. Something like:

> Shp.OLEFormat.Object.Navigate URL

> would work. Were you looking for the appropriate methods to call?

> - Chirag
>   http://officerone.tripod.com/



> > I have done some testing on creating VBA addins for PowerPoint.  I
created
> a
> > limited addin that has a menu item that when selected runs a macro.  The
> > macro adds a slide and then some text.  What I want to do is create a
web
> > browser control( menu item? ) that a user can add to a slide, size it
and
> > set the URL property.  How does one do this? Add a menu item on the tool
> bar
> > that uses user forms to collect the properties and then insert a
> WebBrowser1
> > object on the slide?

> > TIA



Sat, 02 Oct 2004 01:51:26 GMT  
 What am I trying to do?
Please ignore my ignorance.  I now understand a little the difference
between a PowerPoint add in and a COM add in.  I realize that the
intialization is different.  Sorry for the inconvenience OR you are welcome
for the humor.  <g>


Quote:
> That is what I am trying to do.  I am also trying to understand how to
build
> and implement an add in.  I am trying to do a simple COM add in dll to
> insert an item on the tools menu. Then I was going to have the menu item
> display a user form like you said and add a web browser control to a
slide.
> I user the Visual Basic Editor with PPT (2002) and created an Add in
> project.  I created the dll and when I start PowerPoint it is marked with
an
> X in the COM add ins dialog but my item is not added to the menu.  It
seems
> as if I don't get the Auto_Open() event.  I have the designer Initial Load
> Behavior set to startup.

> Do I need to do something further to get my item added to the menu?

> Code snippet:

> Sub ShowForm()
>     MsgBox "I made it!"
> End Sub
> Sub Auto_Open()

>     Dim NewControl As CommandBarControl

>     ' Store an object reference to a command bar.
>     Dim ToolsMenu As CommandBars

>     ' Figure out where to place the menu choice.
>     Set ToolsMenu = Application.CommandBars

>     ' Create the menu choice. The choice is created in the first
>     ' position in the Tools menu.
>     Set NewControl = ToolsMenu("Tools").Controls.Add _
>                      (Type:=msoControlButton, _
>                       Before:=1)

>     ' Name the command.
>     NewControl.Caption = "Show Form"

>     ' Connect the menu choice to your macro. The OnAction property
>     ' should be set to the name of your macro.
>     NewControl.OnAction = "ShowForm"

>    End Sub

> Sub Auto_Close()

>    Dim oControl As CommandBarControl
>    Dim ToolsMenu As CommandBars

>    ' Get an object reference to a command bar.
>    Set ToolsMenu = Application.CommandBars

>    ' Loop through the commands on the tools menu.
>    For Each oControl In ToolsMenu("Tools").Controls

>          ' Check to see whether the comand exists.
>          If oControl.Caption = "Show Form" Then

>            ' Check to see whether action setting is set to ChangeView.
>            If oControl.OnAction = "ShowForm" Then

>                ' Remove the command from the menu.
>                oControl.Delete
>             End If
>          End If
>    Next oControl
> End Sub

> TIA



> > Hi Mike,

> > I don't quite understand what you are after. You can create userform and
> ask
> > the user for the URL. Then you create an instance of WebBrowser control
on
> > the slide with some code like:

> > Set Shp = ActivePresentation.Slides(1).Shapes.Add( _
> >     ClassName:="Shell.Explorer")

> > Set the dimensions of the shape and use Navigate method of the web
browser
> > object. Something like:

> > Shp.OLEFormat.Object.Navigate URL

> > would work. Were you looking for the appropriate methods to call?

> > - Chirag
> >   http://officerone.tripod.com/



> > > I have done some testing on creating VBA addins for PowerPoint.  I
> created
> > a
> > > limited addin that has a menu item that when selected runs a macro.
The
> > > macro adds a slide and then some text.  What I want to do is create a
> web
> > > browser control( menu item? ) that a user can add to a slide, size it
> and
> > > set the URL property.  How does one do this? Add a menu item on the
tool
> > bar
> > > that uses user forms to collect the properties and then insert a
> > WebBrowser1
> > > object on the slide?

> > > TIA



Sat, 02 Oct 2004 03:58:24 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. I am trying to update a record, i am not using data control

2. I am trying to update a record, i am not using data control

3. Recordset: What am I doing wrong?

4. What am I doing wrong??

5. What am I doing wrong?

6. Help with syntax. What am I doing wrong

7. What am I doing wrong?

8. What am I doing wrong?

9. What am I doing wrong?

10. Please tell me what I am doing wrong - DAO parameter Append Query :(

11. Can this be done or am I dreaming?

12. Am I doing the OpenRecordset command correctly?

 

 
Powered by phpBB® Forum Software