Discussion:
How to:write to enterprise custom field from an add-in (C#)
(too old to reply)
o***@gmail.com
2006-08-22 11:44:29 UTC
Permalink
Hi,
I have a question about Enterprise Custom Fields.
I'm working on an add-in and I have the Application object (that I
converted to Microsoft.Office.Interop.MSProject.Application), now i
want to write a value to an enterprise custom field. I don't want to
use the PSI because I already have the application object.
So, how it can be done in the application object?

Thanks,
Omri
Rod Gill
2006-08-23 07:13:58 UTC
Permalink
Easiest way to find out is to record a macro in Project VBA of you doing
what you want manually. The recorded code will provide the Objects and
properties etc. You then just need to convert to C#.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by o***@gmail.com
Hi,
I have a question about Enterprise Custom Fields.
I'm working on an add-in and I have the Application object (that I
converted to Microsoft.Office.Interop.MSProject.Application), now i
want to write a value to an enterprise custom field. I don't want to
use the PSI because I already have the application object.
So, how it can be done in the application object?
Thanks,
Omri
unknown
2006-08-23 08:39:01 UTC
Permalink
When i try to do so, all i got is this:

Sub Macro1()
' Macro Macro1
ProjectSummaryInfo
End Sub

and i can't see ProjectSummaryInfo... so... nothing...
Post by Rod Gill
Easiest way to find out is to record a macro in Project VBA of you doing
what you want manually. The recorded code will provide the Objects and
properties etc. You then just need to convert to C#.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by o***@gmail.com
Hi,
I have a question about Enterprise Custom Fields.
I'm working on an add-in and I have the Application object (that I
converted to Microsoft.Office.Interop.MSProject.Application), now i
want to write a value to an enterprise custom field. I don't want to
use the PSI because I already have the application object.
So, how it can be done in the application object?
Thanks,
Omri
Rod Gill
2006-08-23 08:46:59 UTC
Permalink
The project Summary Information dialog has nothing to do with Enterprise
custom fields. To edit these you have to insert the relevant columns.

To read/Write Properties use:
ActiveProject.BuiltinDocumentProperties("Subject")="My Subject"
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by unknown
Sub Macro1()
' Macro Macro1
ProjectSummaryInfo
End Sub
and i can't see ProjectSummaryInfo... so... nothing...
Post by Rod Gill
Easiest way to find out is to record a macro in Project VBA of you doing
what you want manually. The recorded code will provide the Objects and
properties etc. You then just need to convert to C#.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by o***@gmail.com
Hi,
I have a question about Enterprise Custom Fields.
I'm working on an add-in and I have the Application object (that I
converted to Microsoft.Office.Interop.MSProject.Application), now i
want to write a value to an enterprise custom field. I don't want to
use the PSI because I already have the application object.
So, how it can be done in the application object?
Thanks,
Omri
unknown
2006-08-23 09:21:02 UTC
Permalink
BuiltinDocumentProperties is a property not a method...
and how the user change the Enterprise custom fields? from the project
Information... no?

Thanks,
Omri
Post by Rod Gill
The project Summary Information dialog has nothing to do with Enterprise
custom fields. To edit these you have to insert the relevant columns.
ActiveProject.BuiltinDocumentProperties("Subject")="My Subject"
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by unknown
Sub Macro1()
' Macro Macro1
ProjectSummaryInfo
End Sub
and i can't see ProjectSummaryInfo... so... nothing...
Post by Rod Gill
Easiest way to find out is to record a macro in Project VBA of you doing
what you want manually. The recorded code will provide the Objects and
properties etc. You then just need to convert to C#.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by o***@gmail.com
Hi,
I have a question about Enterprise Custom Fields.
I'm working on an add-in and I have the Application object (that I
converted to Microsoft.Office.Interop.MSProject.Application), now i
want to write a value to an enterprise custom field. I don't want to
use the PSI because I already have the application object.
So, how it can be done in the application object?
Thanks,
Omri
Rod Gill
2006-08-23 20:14:55 UTC
Permalink
There are project enterprise fields under Project Information. However if
you insert EnterpriseTaskText1 that value against the project Summary Task
is the Project level, not task level. So record a macro of you editing an
Enterprise field at the Project Summary level and there is your answer.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by unknown
BuiltinDocumentProperties is a property not a method...
and how the user change the Enterprise custom fields? from the project
Information... no?
Thanks,
Omri
Post by Rod Gill
The project Summary Information dialog has nothing to do with Enterprise
custom fields. To edit these you have to insert the relevant columns.
ActiveProject.BuiltinDocumentProperties("Subject")="My Subject"
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by unknown
Sub Macro1()
' Macro Macro1
ProjectSummaryInfo
End Sub
and i can't see ProjectSummaryInfo... so... nothing...
Post by Rod Gill
Easiest way to find out is to record a macro in Project VBA of you doing
what you want manually. The recorded code will provide the Objects and
properties etc. You then just need to convert to C#.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by o***@gmail.com
Hi,
I have a question about Enterprise Custom Fields.
I'm working on an add-in and I have the Application object (that I
converted to Microsoft.Office.Interop.MSProject.Application), now i
want to write a value to an enterprise custom field. I don't want to
use the PSI because I already have the application object.
So, how it can be done in the application object?
Thanks,
Omri
Omri Swissa
2006-08-28 06:56:01 UTC
Permalink
But i want to write to the enterprise fields under Project Information not
under the project Summary, do you know how it can be done?

Thanks,
Omri
Post by Rod Gill
There are project enterprise fields under Project Information. However if
you insert EnterpriseTaskText1 that value against the project Summary Task
is the Project level, not task level. So record a macro of you editing an
Enterprise field at the Project Summary level and there is your answer.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by unknown
BuiltinDocumentProperties is a property not a method...
and how the user change the Enterprise custom fields? from the project
Information... no?
Thanks,
Omri
Post by Rod Gill
The project Summary Information dialog has nothing to do with Enterprise
custom fields. To edit these you have to insert the relevant columns.
ActiveProject.BuiltinDocumentProperties("Subject")="My Subject"
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by unknown
Sub Macro1()
' Macro Macro1
ProjectSummaryInfo
End Sub
and i can't see ProjectSummaryInfo... so... nothing...
Post by Rod Gill
Easiest way to find out is to record a macro in Project VBA of you doing
what you want manually. The recorded code will provide the Objects and
properties etc. You then just need to convert to C#.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by o***@gmail.com
Hi,
I have a question about Enterprise Custom Fields.
I'm working on an add-in and I have the Application object (that I
converted to Microsoft.Office.Interop.MSProject.Application), now i
want to write a value to an enterprise custom field. I don't want to
use the PSI because I already have the application object.
So, how it can be done in the application object?
Thanks,
Omri
Rod Gill
2006-08-28 09:25:29 UTC
Permalink
They're the same thing. With VBA you can only write to the Project Summary
Task.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by Omri Swissa
But i want to write to the enterprise fields under Project Information not
under the project Summary, do you know how it can be done?
Thanks,
Omri
Post by Rod Gill
There are project enterprise fields under Project Information. However if
you insert EnterpriseTaskText1 that value against the project Summary Task
is the Project level, not task level. So record a macro of you editing an
Enterprise field at the Project Summary level and there is your answer.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by unknown
BuiltinDocumentProperties is a property not a method...
and how the user change the Enterprise custom fields? from the project
Information... no?
Thanks,
Omri
Post by Rod Gill
The project Summary Information dialog has nothing to do with Enterprise
custom fields. To edit these you have to insert the relevant columns.
ActiveProject.BuiltinDocumentProperties("Subject")="My Subject"
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by unknown
Sub Macro1()
' Macro Macro1
ProjectSummaryInfo
End Sub
and i can't see ProjectSummaryInfo... so... nothing...
Post by Rod Gill
Easiest way to find out is to record a macro in Project VBA of you doing
what you want manually. The recorded code will provide the Objects and
properties etc. You then just need to convert to C#.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by o***@gmail.com
Hi,
I have a question about Enterprise Custom Fields.
I'm working on an add-in and I have the Application object (that I
converted to Microsoft.Office.Interop.MSProject.Application), now i
want to write a value to an enterprise custom field. I don't want to
use the PSI because I already have the application object.
So, how it can be done in the application object?
Thanks,
Omri
Omri Swissa
2006-08-28 11:17:02 UTC
Permalink
I see... Thanks a lot!
I don't use VBA I'm using PSI (I'm write in C#) where in the PSI I can do
the same thing?
Because in the PSI I can edit the ProjectSummaryTask but I can see there
only the "fixed" Enterprise fields like "Text1" and etc.
I can't see where I can give my custom field name and value…

Thanks a lot,
Omri swissa
Post by Rod Gill
They're the same thing. With VBA you can only write to the Project Summary
Task.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by Omri Swissa
But i want to write to the enterprise fields under Project Information not
under the project Summary, do you know how it can be done?
Thanks,
Omri
Post by Rod Gill
There are project enterprise fields under Project Information. However if
you insert EnterpriseTaskText1 that value against the project Summary Task
is the Project level, not task level. So record a macro of you editing an
Enterprise field at the Project Summary level and there is your answer.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by unknown
BuiltinDocumentProperties is a property not a method...
and how the user change the Enterprise custom fields? from the project
Information... no?
Thanks,
Omri
Post by Rod Gill
The project Summary Information dialog has nothing to do with Enterprise
custom fields. To edit these you have to insert the relevant columns.
ActiveProject.BuiltinDocumentProperties("Subject")="My Subject"
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by unknown
Sub Macro1()
' Macro Macro1
ProjectSummaryInfo
End Sub
and i can't see ProjectSummaryInfo... so... nothing...
Post by Rod Gill
Easiest way to find out is to record a macro in Project VBA of you doing
what you want manually. The recorded code will provide the Objects and
properties etc. You then just need to convert to C#.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Post by o***@gmail.com
Hi,
I have a question about Enterprise Custom Fields.
I'm working on an add-in and I have the Application object (that I
converted to Microsoft.Office.Interop.MSProject.Application), now i
want to write a value to an enterprise custom field. I don't want to
use the PSI because I already have the application object.
So, how it can be done in the application object?
Thanks,
Omri
Pat
2006-08-23 20:31:28 UTC
Permalink
In VBA:

ActiveProject.ProjectSummaryTask.SetField pjCustomProjectEnterpriseText1,
"Hi all"
--
Pat [Microsoft Office Project MVP]
.........................
www.riolab.org
.........................
Loading...