How do I download a doc from project into an ms offc calendar?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have info entered into a microsoft project document already that we need to
have into a standard calendar format instead

How can I export that data into the other program?
 
Kim said:
I have info entered into a microsoft project document already that we need to
have into a standard calendar format instead

How can I export that data into the other program?

Hi Kim,

Here's a very rough example of how to open Project 2000 from Access 97:

Private Sub cmdOpenProject_Click()
Dim MyDB As Database
Dim AppRS As Recordset
Dim strSQL As String
Dim oApp As MSProject.Application
Dim oProj As MSProject.Project
Dim oTasks As Tasks
Dim strDirectory As String
Dim strFile As String

'Get the file directory
Set MyDB = CurrentDb
strSQL = "SELECT DirectoryName FROM tblProjectFilesDir;"
Set AppRS = MyDB.OpenRecordset(strSQL, dbOpenSnapshot)
strDirectory = ""
If AppRS.RecordCount > 0 Then
AppRS.MoveFirst
strDirectory = Nz(AppRS("DirectoryName"), "")
End If
AppRS.Close
Set AppRS = Nothing
Set MyDB = Nothing
If strDirectory = "" Then
MsgBox ("Unable to find project files directory in
tblProjectFilesDir. Exiting.")
Exit Sub
End If
If Dir(strDirectory, vbDirectory) = "" Then
MsgBox (strDirectory & "\ could not be found. Exiting.")
Exit Sub
End If
strFile = strDirectory & "\" & CStr(strSearchJob) & ".mpp"
If Dir(strFile) <> "" Then
Set oApp = CreateObject("MSProject.Application")
oApp.FileNew
oApp.Visible = True
oApp.Visible = True
oApp.FileOpen Name:=strFile, ReadOnly:=False, FormatID:="MSProject.MPP.8"
Set oProj = oApp.ActiveProject
'Set oTasks = oProj.Tasks
'For i = 1 To 100
' Set otask = oTasks.Add(False)
' otask.Type = 1
' otask.Name = "Task " & i
' otask.Notes = "Nothing to comment here :-/"
' otask.Text30 = "My Specific Text"
'Next
Set oProj = Nothing
'Set oTasks = Nothing
oApp.FileCloseAll pjDoNotSave
oApp.Quit
Set oApp = Nothing
Else
MsgBox (strFile & " could not be found.")
End If
End Sub

Also check to see if Project can export a CSV file containing your
information that can be linked within Access. After getting the
information you need from Project check out:

http://groups.google.com/group/comp.databases.ms-access/msg/1b176f58cab46186

A sample of the output without the annotations shown is:

http://www.oakland.edu/~fortune/2006Calendar.zip

The table in Access allows you to place up to five records with a line
number from 1 to 5 for each day. Each line can have up to 30 characters
that automatically shrink to fit inside the box for that day whenever
the length exceeds something like 19 characters. Perhaps this is what
you're looking for. With some work, this could be changed into a Gantt
chart but that is not a priority for me right not. Note that it is best
to use the copious graphics command set that is built into Access (MS
Graph) whenever possible. I use the PDF format when I need extreme
formatting flexibility. The same thing can be done using the graphics
API commands.

James A. Fortune
(e-mail address removed)
 
James said:
Hi Kim,

Here's a very rough example of how to open Project 2000 from Access 97:

Private Sub cmdOpenProject_Click()
...

you're looking for. With some work, this could be changed into a Gantt
chart but that is not a priority for me right not. Note that it is best

right not = right now

I guess I'm tired. Plus, ignore my post. I didnt' notice that you
wanted the data to go into an MS Calendar.

James A. Fortune
(e-mail address removed)
 

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

Back
Top