Turtle3700
Turtle3700

Reputation: 137

PowerPoint VBA Macro Gives Run Time Error 448: Named argument not found

I'm trying to create a PowerPoint 2010 VBA Macro to add a text box to every slide. However, using the command from the MSOffice documentation to create a text box doesn't even work.

Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddTextbox(Type:=msoTextOrientationHorizontal, _
Left:=100, Top:=100, Width:=200, Height:=50).TextFrame _
.TextRange.Text = "Test Box"

This returns

Run-time error '448':
Named argument not found

Is the documentation wrong or am I missing something?

Upvotes: 2

Views: 1207

Answers (1)

ChipsLetten
ChipsLetten

Reputation: 2953

Replace Type:= with Orientation:=

Upvotes: 2

Related Questions