adding a text box to powerpoint from Access

Zedster

Registered User.
Local time
Today, 14:32
Joined
Jul 2, 2019
Messages
169
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"
 
Now sorted, I needed to add references to the MS Office object library as well as ms powerpoint object library.
 
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.
 
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

Back
Top Bottom