Walter L. skinner said:
John: I set up the Name field as a string. However, it didn't take into
account the nulls required for the indentation. Plus, how do you get the
column width setting. I can't seem to get it to work. could you help me again
please.
Thanks.
Walt
Walt,
I hadn't considered the indentation aspect (and don't forget about the
space taken up by the outline symbol, if that option is turned on).
Having to deal with these little nuances doesn't nix the method I
described, it only makes it more interesting. (To be honest my text
parsing code was for Excel so I didn't have to worry about indenture or
outline symbols).
For the outline symbol issue you can either turn it off (same thing with
indenture) or you can run a few tests to gage how many equivalent
characters each is worth.
The column width property is only available via VBA in the latest
versions of Project (i.e. 2003, I don't know about 2002 since I don't
have that version), so if you are using Project 2000 for example you
either can't get there from here or you will need to come up with an
indirect method of determining column width. Anyway the syntax (and I
had a bear of a time digging this out of the VBA help file) for column
width is:
ActiveProject.TaskTables(x).TableFields(y).Width
x = index or string representing the desired view table. In my case, I
used, "entry"
y = index of the view table column. So for example if the Task Name
field is the 2nd column then y = 2. Apparently a string value (i.e.
Task Name") doesn't work for the index of the TableFields collection.
Hope this helps.
John
Project MVP