none
Problem involving the Interop for MS Project 2003. RRS feed

  • Question

  • I'm running VS2005 and MS Project 2003.  I'm writing a custom Winforms app that, among other things, calls up an instance of MS Project 2003 and loads and manipulates an MPP file.  (I can't remember if I've asked before but how common is this sort of thing?)

    The display of the MPP file is the default.  List of tasks on the left, Gantt chart on the right. 

    My problem is this: How do I programatically manipulate the date setting on the Gantt Chart?  That is, set it so the first day displayed is the same as the start date of the first task displayed on the left? 

    Wednesday, August 4, 2010 1:42 PM

Answers

  • Hi,

    I do not know all the stuff you have to add for Interop, but here are the objects:

    The instruction is application.editgoto, with two options:

    editgoto id:=xxx 'positions the timescale such that task id xxx will be visible

    editgoto date:="xx/yy/ZZZ" 'positions the timescale such that xx/yy/zzz appears on the left.

    Greetings,

    • Marked as answer by B. Chernick Wednesday, August 4, 2010 3:42 PM
    Wednesday, August 4, 2010 2:09 PM
    Moderator

All replies

  • Hi,

    I do not know all the stuff you have to add for Interop, but here are the objects:

    The instruction is application.editgoto, with two options:

    editgoto id:=xxx 'positions the timescale such that task id xxx will be visible

    editgoto date:="xx/yy/ZZZ" 'positions the timescale such that xx/yy/zzz appears on the left.

    Greetings,

    • Marked as answer by B. Chernick Wednesday, August 4, 2010 3:42 PM
    Wednesday, August 4, 2010 2:09 PM
    Moderator
  • HI,
     
    It is a common task to manipulate Project via automation.

    --

    Rod Gill
    Microsoft MVP for Project - http://www.project-systems.co.nz
     
    Author of the only book on Project VBA, see: http://www.projectvbabook.com
     

     
    "B. Chernick" wrote in message news:103ae472-e5d5-46fd-ad96-049b1d4d2771...

    I'm running VS2005 and MS Project 2003.  I'm writing a custom Winforms app that, among other things, calls up an instance of MS Project 2003 and loads and manipulates an MPP file.  (I can't remember if I've asked before but how common is this sort of thing?)

    The display of the MPP file is the default.  List of tasks on the left, Gantt chart on the right. 

    My problem is this: How do I programatically manipulate the date setting on the Gantt Chart?  That is, set it so the first day displayed is the same as the start date of the first task displayed on the left? 



    __________ Information from ESET Smart Security, version of virus signature database 5342 (20100805) __________

    The message was checked by ESET Smart Security.

    http://www.eset.com

    The one and only Project VBA Book Rod Gill Project Management
    Thursday, August 5, 2010 10:40 AM
    Moderator