Set Author of schedule programatically

V

Vidya

I am unable to set the author for a schedule programatically . I guess, the API does not work. Is there any way i can set it, other than accessing the database directly ?
 
J

JackD

It should work.
Can you provide the code you are using?

-Jack


Vidya said:
I am unable to set the author for a schedule programatically . I guess,
the API does not work. Is there any way i can set it, other than accessing
the database directly ?
 
V

Vidya

This is what i do to set the author name for schedule -
/////////////////////
MSProject.Application Appobj = new MSProject.Application()
bool flag = Appobj.FileOpen(@"<MSP_Diamond>\AAA",false,MSProject.PjMergeType.pjDoNotMerge,false,"",""
false,"msp_user","msp","MSProject.odbc",""
MSProject.PjPoolOpen.pjPoolReadWrite,"","",true)
string sAuthor = "VIDYAR"
Appobj.ActiveProject.Author = (object)sAuthor
Appobj.FileSave()
//////////////////////

Is this the correct way of setting the author name? Is there some other way of setting the name of the schedule creator

Thanks.
Vidy
 
R

Rod Gill

Hi,

In VBA I would use:
activeproject.BuiltinDocumentProperties("Author")="VIDYAR"

--
Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.projectlearning.com/
Vidya said:
This is what i do to set the author name for schedule -
//////////////////////
MSProject.Application Appobj = new MSProject.Application();
bool flag =
Appobj.FileOpen(@ said:
false,"msp_user","msp","MSProject.odbc","",
MSProject.PjPoolOpen.pjPoolReadWrite,"","",true);
string sAuthor = "VIDYAR";
Appobj.ActiveProject.Author = (object)sAuthor;
Appobj.FileSave();
///////////////////////

Is this the correct way of setting the author name? Is there some other
way of setting the name of the schedule creator?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top