Referencing to a Active X Textbox in the Slide Master

B

ben.whitcombe

Hey.

I'm trying to set up a text box that'll show a value gathered from an
access database everytime the slide is changed. I have a lot of that
done already, but the problem I am having is getting the value from the
recordset to the textbox.

I've discovered that powerpoint requires that you declare then
reference the active x textbox in a fasion much like this...

'Declare an object variable to store the reference
Dim otxtBox As TextBox ' MS Forms textbox

' Get a reference to the text box object
Set otxtBox = ActivePresentation.Slides(1).Shapes(1).OLEFormat.Object

The problem with this is that it requires I point out which slide and
which shape it is on.
Since I want it on every slide, I thought I would put it into the Slide
Master, and have it as a part of the template.

Can I just reference to that one text box in the Slide Master? Or is
there a better way of doing this?
Any help or suggestions would be greatly appericated, thanks.

Ben Whitcombe
 
S

Steve Rindsberg

Hey.

I'm trying to set up a text box that'll show a value gathered from an
access database everytime the slide is changed. I have a lot of that
done already, but the problem I am having is getting the value from the
recordset to the textbox.

I've discovered that powerpoint requires that you declare then
reference the active x textbox in a fasion much like this...

'Declare an object variable to store the reference
Dim otxtBox As TextBox ' MS Forms textbox

' Get a reference to the text box object
Set otxtBox = ActivePresentation.Slides(1).Shapes(1).OLEFormat.Object

The problem with this is that it requires I point out which slide and
which shape it is on.
Since I want it on every slide, I thought I would put it into the Slide
Master, and have it as a part of the template.

Can I just reference to that one text box in the Slide Master?

Sure. It depends a bit on which version of PPT you're using (whether it
supports multiple masters and if so, whether you're using 'em) but try:

Set oTxtBox = ActivePresentation.SlideMaster.Shapes(1).OLEFormat.Object

(SlideMaster or TitleMaster, depending on which you need)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top