Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
other
informationbridge
office.intranets
office.misc
office.setup
office.xml
officeupdate
onenote
photodraw.discussion
powerpoint
producer
proj.standard&server
project
project.developer
project.pro_and_serve
project.server
project.vba
project2000
publisher
publisher.prepress
publisher.programming
publisher.webdesign
visio
visio.createshapes
visio.database.modeling
visio.dev.diagrams
visio.dev.shapesheet
visio.dev.vba
visio.dev.vc
visio.developer
visio.general
visio.installation
visio.printing
visio.software.modeling
visio.troubleshoot
  
 
date: Fri, 15 Aug 2008 07:20:02 -0700,    group: microsoft.public.project.developer        back       


Project Owner and Custom Fields from VBA   
How do I access the valve of the Project Owner and custom enterprise fields 
of a project in Project Server 2007 from MS Project Pro VBA?

Gary
date: Fri, 15 Aug 2008 07:20:02 -0700   author:   Gary Zag

Re: Project Owner and Custom Fields from VBA   
Hi,

In Project Pro 2007 use:

activecell.task.getfield(application.fieldnametofieldconstant("Field 
Name",pjTask))

This is from memory, so clearly I need a new life and there are no 
guarantees this code will work as is!!
-- 

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



"Gary Zag"  wrote in message 
news:8C4F0D6E-D6E0-4775-B37F-2B9087000251@microsoft.com...
> How do I access the valve of the Project Owner and custom enterprise 
> fields
> of a project in Project Server 2007 from MS Project Pro VBA?
>
> Gary
date: Sat, 16 Aug 2008 13:18:40 +1200   author:   Rod Gill rodATproject-systemsDOTcoDOTnz

Re: Project Owner and Custom Fields from VBA   
Ron,

Thanks that works for the custom fields.  Anyone know how to get the value 
of Project Owner from VBA?

Gary

"Rod Gill" wrote:

> Hi,
> 
> In Project Pro 2007 use:
> 
> activecell.task.getfield(application.fieldnametofieldconstant("Field 
> Name",pjTask))
> 
> This is from memory, so clearly I need a new life and there are no 
> guarantees this code will work as is!!
> -- 
> 
> Rod Gill
> Microsoft MVP for Project
> 
> Author of the only book on Project VBA, see:
> http://www.projectvbabook.com
> 
> 
> 
> "Gary Zag"  wrote in message 
> news:8C4F0D6E-D6E0-4775-B37F-2B9087000251@microsoft.com...
> > How do I access the valve of the Project Owner and custom enterprise 
> > fields
> > of a project in Project Server 2007 from MS Project Pro VBA?
> >
> > Gary 
> 
>
date: Mon, 18 Aug 2008 05:21:00 -0700   author:   Gary Zag

Re: Project Owner and Custom Fields from VBA   
Function GetOwner(p As Project) As String
On Error Resume Next
    GetOwner = p.CustomDocumentProperties("Owner")
    If Err Then ' 5 on fail
        Err.Clear
        GetOwner = ""
    End If
    On Error GoTo 0
End Function


"Gary Zag"  wrote in message 
news:24150303-83CF-4011-B649-C6CFFEB93455@microsoft.com...
> Ron,
>
> Thanks that works for the custom fields.  Anyone know how to get the value
> of Project Owner from VBA?
>
> Gary
>
> "Rod Gill" wrote:
>
>> Hi,
>>
>> In Project Pro 2007 use:
>>
>> activecell.task.getfield(application.fieldnametofieldconstant("Field
>> Name",pjTask))
>>
>> This is from memory, so clearly I need a new life and there are no
>> guarantees this code will work as is!!
>> -- 
>>
>> Rod Gill
>> Microsoft MVP for Project
>>
>> Author of the only book on Project VBA, see:
>> http://www.projectvbabook.com
>>
>>
>>
>> "Gary Zag"  wrote in message
>> news:8C4F0D6E-D6E0-4775-B37F-2B9087000251@microsoft.com...
>> > How do I access the valve of the Project Owner and custom enterprise
>> > fields
>> > of a project in Project Server 2007 from MS Project Pro VBA?
>> >
>> > Gary
>>
>>
date: Mon, 18 Aug 2008 09:42:56 -0400   author:   Bill B

Re: Project Owner and Custom Fields from VBA   
Bill,

This does not work.  It produces an error.  The CustomDocumentProperties 
collection does not have a element with the Name of "Owner".

Gary


"Bill B" wrote:

> Function GetOwner(p As Project) As String
> On Error Resume Next
>     GetOwner = p.CustomDocumentProperties("Owner")
>     If Err Then ' 5 on fail
>         Err.Clear
>         GetOwner = ""
>     End If
>     On Error GoTo 0
> End Function
> 
> 
> "Gary Zag"  wrote in message 
> news:24150303-83CF-4011-B649-C6CFFEB93455@microsoft.com...
> > Ron,
> >
> > Thanks that works for the custom fields.  Anyone know how to get the value
> > of Project Owner from VBA?
> >
> > Gary
> >
> > "Rod Gill" wrote:
> >
> >> Hi,
> >>
> >> In Project Pro 2007 use:
> >>
> >> activecell.task.getfield(application.fieldnametofieldconstant("Field
> >> Name",pjTask))
> >>
> >> This is from memory, so clearly I need a new life and there are no
> >> guarantees this code will work as is!!
> >> -- 
> >>
> >> Rod Gill
> >> Microsoft MVP for Project
> >>
> >> Author of the only book on Project VBA, see:
> >> http://www.projectvbabook.com
> >>
> >>
> >>
> >> "Gary Zag"  wrote in message
> >> news:8C4F0D6E-D6E0-4775-B37F-2B9087000251@microsoft.com...
> >> > How do I access the valve of the Project Owner and custom enterprise
> >> > fields
> >> > of a project in Project Server 2007 from MS Project Pro VBA?
> >> >
> >> > Gary
> >>
> >> 
> 
> 
>
date: Wed, 27 Aug 2008 14:51:02 -0700   author:   Gary Zag

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us