• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 611
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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