Ms Project OLE Automation

Melihat documentasi microsoft tentang Microsoft Office Project … brrr…. buanyakkk !!. sebagai bentuk catatan bagi saya dan mungkin bantuan bagi pembaca maka saya sharing dikit mengenai Object-object yang ada di microsoft Office Project. ini unit interfacenya, yang dipake aja


unit MSProject_Intf;

interface

uses
ActiveX;

Const
Class_ProjectApplication: TGUID = '{36D27C48-A1E8-11D3-BA55-00C04F72F325}';
Class_Projects: TGUID = '{1019A320-508A-11CF-A49D-00AA00574C74}';

type
PjPoolOpen = TOleEnum;
const
pjPromptPool = $00000000;
pjPoolReadOnly = $00000001;
pjPoolReadWrite = $00000002;
pjPoolAndSharers = $00000003;
pjDoNotOpenPool = $00000004;

type
PjMergeType = TOleEnum;
const
pjDoNotMerge = $00000000;
pjMerge = $00000001;
pjPrompt = $00000002;
pjAppend = $00000003;

type
PjSaveType = TOleEnum;
const
pjDoNotSave = $00000000;
pjSave = $00000001;
pjPromptSave = $00000002;

type
PjResourceTypes = TOleEnum;
const
pjResourceTypeWork = $00000000;
pjResourceTypeMaterial = $00000001;
pjResourceTypeCost = $00000002;

type
MSProjectApplication = dispinterface;
Project = dispinterface;
Tasks = dispinterface;

ProjectApplication = MSProjectApplication;

Assignment = dispinterface
['{000C0C45-0000-0000-C000-000000000046}']
property TaskID: Integer dispid 255852547;
property ResourceID: Integer dispid 255852548;
property TaskName: WideString dispid 255852549;
property ResourceName: WideString dispid 255852550;
property Units: OleVariant dispid 255852551;
property Work: OleVariant dispid 255852552;
property Start: OleVariant dispid 255852564;
property Finish: OleVariant dispid 255852565;
property ActualStart: OleVariant dispid 255852566;
property ActualFinish: OleVariant dispid 255852567;
property Delay: OleVariant dispid 255852569;
property Cost: OleVariant dispid 255852570;
property OvertimeCost: OleVariant readonly dispid 255852571;
property ActualCost: OleVariant dispid 255852572;
property RemainingCost: OleVariant readonly dispid 255852573;
property ActualOvertimeCost: OleVariant readonly dispid 255852574;
property RemainingOvertimeCost: OleVariant readonly dispid 255852575;
procedure Delete; dispid 255852680;
property ResourceType: PjResourceTypes readonly dispid 255852820;
property BudgetWork: OleVariant dispid 255853213;
property BudgetCost: OleVariant dispid 255853214;
end;

Assignments = dispinterface
['{000C0C46-0000-0000-C000-000000000046}']
property Application: ProjectApplication readonly dispid 65524;
property Parent: Project readonly dispid 65523;
property Count: Integer readonly dispid 65525;
property UniqueID[Index: Integer]: Assignment readonly dispid 65521;
function Add(TaskID: OleVariant; ResourceID: OleVariant; Units: OleVariant): Assignment; dispid 65526;
property Item[Index: OleVariant]: Assignment readonly dispid 0; default;
property _NewEnum: IUnknown readonly dispid -4;
end;

Resource = dispinterface
['{F59E841B-1518-4466-85EB-CCE914D59AF6}']
property ID: Integer readonly dispid 205520896;
property Name: WideString dispid 205520897;
property Cost: OleVariant readonly dispid 205520908;
property Work: OleVariant readonly dispid 205520909;
property Assignments: Assignments readonly dispid 205520951;
property Index: Integer readonly dispid 205521149;
property type_: PjResourceTypes dispid 205521196;
property CostPerUse: OleVariant dispid 205520914;
end;

Resources = dispinterface
['{000C0C42-0000-0000-C000-000000000046}']
property Application: ProjectApplication readonly dispid 65524;
property Parent: Project readonly dispid 65523;
property Count: Integer readonly dispid 65525;
property UniqueID[Index: Integer]: Resource readonly dispid 65521;
function Add(Name: OleVariant; Before: OleVariant): Resource; dispid 65526;
property Item[Index: OleVariant]: Resource readonly dispid 0; default;
property _NewEnum: IUnknown readonly dispid -4;
end;

Task = dispinterface
['{4A4829B2-31DA-4F61-AF00-8F5CE32B9442}']
property Cost: OleVariant dispid 188743685;
property ID: Integer readonly dispid 188743703;
property Resources: Resources readonly dispid 188743919;
property Assignments: Assignments readonly dispid 188743886;
property Index: Integer readonly dispid 188744040;
property OutlineLevel: Smallint dispid 188743765;
property ActualStart: OleVariant dispid 188743721;
property ActualFinish: OleVariant dispid 188743722;
property Name: WideString dispid 188743694;
property OutlineChildren: Tasks readonly dispid 188743817;
end;

Tasks = dispinterface
['{000C0C40-0000-0000-C000-000000000046}']
property Application: ProjectApplication readonly dispid 65524;
property Parent: Project readonly dispid 65523;
property Count: Integer readonly dispid 65525;
property UniqueID[Index: Integer]: Task readonly dispid 65521;
function Add(Name: OleVariant; Before: OleVariant): Task; dispid 65526;
property Item[Index: OleVariant]: Task readonly dispid 0; default;
property _NewEnum: IUnknown readonly dispid -4;
end;

Project = dispinterface
['{B948BE90-9E17-42B1-88D4-03E6B7B27B8A}']
procedure Activate; dispid 13;
property ID: Integer readonly dispid 47;
property Resources: Resources readonly dispid 2;
property Tasks: Tasks readonly dispid 1;
property Index: OleVariant readonly dispid 65527;
property Parent: IDispatch readonly dispid 65523;
property Application: ProjectApplication readonly dispid 65524;
property Work: OleVariant readonly dispid 100;
property ActualStart: OleVariant readonly dispid 141;
property ActualFinish: OleVariant readonly dispid 142;
property Name: WideString dispid 0;
end;

Projects = dispinterface
['{574E0861-265A-4E1A-AB8C-9A2864D5F6F4}']
property Application: ProjectApplication readonly dispid 65524;
property Parent: IDispatch readonly dispid 65523;
property Count: Integer readonly dispid 65525;
function Add(DisplayProjectInfo: OleVariant; Template: OleVariant; FileNewDialog: OleVariant): Project; dispid 65526;
property Item[Index: OleVariant]: Project readonly dispid 0; default;
property _NewEnum: IUnknown readonly dispid -4;
function CanCheckOut(FileName: OleVariant): WordBool; dispid 1;
function CheckOut(FileName: OleVariant): WordBool; dispid 2;
end;

MSProjectApplication = dispinterface
['{00020AFF-0000-0000-C000-000000000046}']
function FileOpen(Name: OleVariant; ReadOnly: OleVariant; Merge: OleVariant;
TaskInformation: OleVariant; Table: OleVariant; Sheet: OleVariant;
NoAuto: OleVariant; UserID: OleVariant; DatabasePassWord: OleVariant;
FormatID: OleVariant; Map: OleVariant; openPool: PjPoolOpen;
Password: OleVariant; WriteResPassword: OleVariant;
IgnoreReadOnlyRecommended: OleVariant; XMLName: OleVariant): WordBool; dispid 102;
function OpenXML(const XML: WideString): SYSINT; dispid 5079;
function AppMaximize: WordBool; dispid 2008;
function AppMinimize: WordBool; dispid 2009;
function FileClose(Save: PjSaveType; NoAuto: OleVariant): WordBool; dispid 103;
function DocClose: WordBool; dispid 2007;
property Projects: Projects dispid 5000;
end;

implementation

end.

2 thoughts on “Ms Project OLE Automation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s