adding a text box to powerpoint from Access (1 Viewer)

Zedster

Registered User.
Local time
Today, 16:45
Joined
Jul 2, 2019
Messages
168
I am trying to add a textbox to a powerpoint slide using access.

I am following the syntax from microsoft website. But I keep getting a compile error variable not defined with msoTextOrientationHorizontal highlighted. I am confused.

Code:
Set mySlide = myPresentation.Slides.Add((intSlideCount + 1), ppLayoutBlank) 
Set tbxTitle = mySlide.Shapes.AddTextbox(Type:=msoTextOrientationHorizontal, Left:=10, Top:=10, Width:=800, Height:=25).TextFrame.TextRange
tbxTitle = "Monthly Summary"
 

Zedster

Registered User.
Local time
Today, 16:45
Joined
Jul 2, 2019
Messages
168
Now sorted, I needed to add references to the MS Office object library as well as ms powerpoint object library.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:45
Joined
May 7, 2009
Messages
19,169
you're doing it the hard way.
just create a Template ppt with blank textbox at your desired location.
in access vba, you just filled them up.
 

Zedster

Registered User.
Local time
Today, 16:45
Joined
Jul 2, 2019
Messages
168
you're doing it the hard way.
just create a Template ppt with blank textbox at your desired location.
in access vba, you just filled them up.

I take your point, however:

  • The presentation has multiple slides, the quantity varies and the title position may need to change for each.
  • I need to be able to add text boxes because each slide will need them, there will be different quantities on each and they will be in different locations
I am going to need to add text boxes to the presentation anyway

Now sorted, I needed to change "Type:=" to "Orientation:="
 

Users who are viewing this thread

Top Bottom