[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 605
  • Last Modified:

MsoTextOrientation not declared

I am creating a powerpoint slide from vb .net.  I have it working where it can add a picture, but I wanted to add a text box.  When I use the following line of code, it says that Name MsoTextOrientation is not declared.  What am I missing?

        oSlide.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal, 2, 2, 2, 2)

Here are my imports at the top:

Imports System.Data
Imports Office = Microsoft.Office.Core
Imports PowerPoint = Microsoft.Office.Interop.PowerPoint
Imports System.Drawing
Imports System.Drawing.Printing

Imports System.ComponentModel
Imports System.ServiceProcess
0
spmcmorrow
Asked:
spmcmorrow
  • 2
1 Solution
 
mdamicoCommented:
oSlide.Shapes.AddTextbox(Office.MsoTextOrientation.msoTextOrientationHorizontal, 2, 2, 2, 2)


0
 
mdamicoCommented:
or change

Imports Office = Microsoft.Office.Core

to

Imports Microsoft.Office.Core

and the original code would work
0
 
spmcmorrowAuthor Commented:
thank you
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now