Solved

MsoTextOrientation not declared

Posted on 2004-08-07
3
583 Views
Last Modified: 2008-02-01
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
Comment
Question by:spmcmorrow
  • 2
3 Comments
 
LVL 7

Expert Comment

by:mdamico
ID: 11743627
oSlide.Shapes.AddTextbox(Office.MsoTextOrientation.msoTextOrientationHorizontal, 2, 2, 2, 2)


0
 
LVL 7

Accepted Solution

by:
mdamico earned 250 total points
ID: 11743633
or change

Imports Office = Microsoft.Office.Core

to

Imports Microsoft.Office.Core

and the original code would work
0
 

Author Comment

by:spmcmorrow
ID: 11744128
thank you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now