Programmatically print Microsoft Project Timeline

I'm working with a timeline view in Microsoft project.  I need to have a command line or batch capability to print the image of the timeline into a file that can be run as a scheduled task.  Is there a command line way to tell project to export the timeline as image with anyone having to interact with?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PortletPaulEE Topic AdvisorCommented:
when you say "timeline" do you mean the Gantt View or something else (e.g. a report)
is there a sequence of on-screen commands that you would follow to do this?
(have you tried recording this as a macro?)

what type of file? e.g. PDF

is this scheduled task run on just one project file, with a constant filename, in the same location
or is this for multiple files and/or in multiple locations?
on one workstation or more than one?

which scheduler are you referring to?

What versions of: MSP? Windows? Is Project Server involved at all?

While I can't write the magic for you, I can suggest you haven't provided sufficient information.

I believe what you are asking for MIGHT be possible (e.g. printing a report to a pdf file) through POWERSHELL or VBA but the person preparing that magic needs to know more about the requirements and environment.
HyperBPPAuthor Commented:
Project Professional 2013 on WIndows.  No Server.  Any file type would work: PDF, GIF, JPG.  Scheduled task with everything constant.  I'm just interested in the call to copy the timeline image.  Not worried about the scheduler as much as the command to print the image.  Specifically would like the Timeline chart.  Sorry for the lack of clarity before... I'm thinking this might be better executed in and then have a scheduled execution of a module.

HyperBPPAuthor Commented:
Here's the macro that I would like to replicate:

 Sub SaveTimeline()
 ' Macro SaveTimeline
 ' Macro Recorded Fri 3/13/15 by Talbott, Taylor W..
     TimelineExport ExportWidth:=600
 End Sub

I need to do the "TimelineExport" and width of this portion.  This question has morphed into this question:
HyperBPPAuthor Commented:
Dim myApp As New Microsoft.Office.Interop.MSProject.Application

         Dim myProj As Microsoft.Office.Interop.MSProject.Project


         myApp.Visible = False

         myProj = myApp.ActiveProject


         myApp.TimelineExport(False, 940)

         Dim oDataObj As System.Windows.Forms.IDataObject

         oDataObj = System.Windows.Forms.Clipboard.GetDataObject()

         Dim oImgObj As System.Drawing.Image = oDataObj.GetData(System.Windows.Forms.DataFormats.Bitmap, True)
         oImgObj.Save("C:\Users\ttalbott\Documents\Qlik\Sense\Content\Default\testing.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)

         myApp = Nothing

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HyperBPPAuthor Commented:
Discovered solution on own.  Was not provided by commenters
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Project Management

From novice to tech pro — start learning today.