Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Project 2010 wraptext() Method confusion

$
0
0

Hi All,

I am writing a VS 2010 app that creates a new Project Gantt. However, I do not want the Task Name column to wrap text. I am trying to use the wraptext() method, but I am not seeing where I am going wrong.

my code looks like this:

        Public Function CreateGantt()

        Dim TaskList() As String
        Dim NewWrapSetting As Boolean

        oProject = CreateObject("msProject.application") '(oProject is a global variable)
        Ganttdoc = oProject.Projects.Add()                        '(Ganttdoc is a global variable)
        oProject.Visible = True

        oProject.Application.WrapText(2) = False
If I use the method like above, I get an error saying "Expression is a value and therefore cannot the target of an assignment"

        NewWrapSetting = oProject.Application.WrapText(2) = False
If I use the method like above, I do not get an error, but the wraptext setting does not change

The msdn explanation indicates that the method "toggles" the setting, so I do not believe that it is readonly. If it is, can someone help me to change the setting programmatically?

Other note: If I try the same command directly in Project through VBA, I get an error saying "Assignment to constant not permitted"

Thanks for your help


Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>