where can i find the notes i write when upload files to server

L

lissa

where can i find the notes i write when upload files to server,in sql server
database,or in a file at project server

tks!
 
J

Jason-W

Hi,

I assume you are talking about either task, resource, or
assignment notes???

If so, this information can be found in the PJDB.HTM file
(located in \Program Files\Microsoft Office\OFFICE11\1033
on any machine with Project Professional).

These are stored in a fields called xxx_RTF_NOTES (where
xxx is either ASSN for assignments, RES for resource, TASK
for tasks) in their respective tables: MSP_ASSIGNMENTS,
MSP_RESOURCES, & MSP_TASKS.

One method to read or write RTF notes using VBA (copied
from the PJDB.htm file) is shown at the end of this
message.

HTH
--Jason

-------------------------------------
The following is copied from the PJDB.HTM file included
with Project
-------------------------------------
Reading and writing RTF notes
To retrieve data from the RTF notes columns in the
MSP_TASKS, MSP_RESOURCES or MSP_ASSIGNMENTS tables, copy,
modify and execute the following VB script:

Sub getRtf()
'This macro extracts RTF data from
MSP_TASKS.TASK_RTF_NOTES. This data can then be written
'to a file that can be opened with Microsoft Word or
displayed in a richedit control.

Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim sql As String, rtf As String, cnString

'Open the MSP_TASKS table to look for TASK_RTF_NOTES
cnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\temp\MyProject.mpd"
sql = "select PROJ_ID, TASK_UID, TASK_RTF_NOTES " & _
"from MSP_TASKS " & _
"where TASK_RTF_NOTES is not null" 'can specify
a specific PROJ_ID and TASK_UID instead
cn.Open cnString
rs.Open sql, cn

'Enumerate across the recordset looking for notes
With rs
Do While Not .EOF
rtf = StrConv(.Fields("TASK_RTF_NOTES"),
vbUnicode) ' Put binary column data into text string
Debug.Print rtf
.MoveNext
Loop
.Close
End With
End Sub

Note Be sure to check the code listed above for all
references to MSP_TASKS, TASK_RTF_NOTES, and TASK_UID. You
will need to modify TASKS to RES or ASSN, depending on
which table you are pulling RTF data from.

To write data to the RTF notes columns in the MSP_TASKS,
MSP_RESOURCES or MSP_ASSIGNMENTS tables, copy, modify and
execute the following VB script:

Sub writeRtf()
'This macro writes RTF data to
MSP_TASKS.TASK_RTF_NOTES.

Dim cn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim param As New ADODB.Parameter
Dim sql As String, rtf As String, cnString As String

cnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\temp\MyProject.mpd"
sql = "update MSP_TASKS set TASK_RTF_NOTES = ? where
PROJ_ID = 1 and TASK_UID = 1"
rtf = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033
{\fonttbl{\f0\fswiss\fcharset0 Arial;}}" & vbNewLine & _
"\viewkind4\uc1\pard\f0\fs20 What's in a name?
That which we call a rose... \par" & vbNewLine & _
"}" & vbNewLine & vbLf & Chr(0) 'be sure to
specify valid RTF text here including "vbLf & Chr(0)

cn.Open cnString

param.Direction = adParamInput
param.Type = adVarBinary
param.Size = 8000
param.Value = StrConv(rtf, vbFromUnicode)

cmd.ActiveConnection = cn
cmd.CommandText = sql
cmd.Parameters.Append param
cmd.Execute
End Sub

Note Be sure to check the code listed above for all
references to MSP_TASKS, TASK_RTF_NOTES, and TASK_UID. You
will need to modify TASKS to RES or ASSN, depending on
which table you are pulling RTF data from.

The Microsoft ActiveX Data Objects (ADO) 2.1 (or later)
library must be referenced in the Microsoft Visual Basic
editor for VBA for these scripts to run. Be sure to set
the columns TASK_HAS_NOTES in the MSP_TASKS table and
PROJ_EXT_EDITED in the MSP_PROJECTS table to 1 for Project
to process. The same applies when changing RTF notes in
MSP_RESOURCES and MSP_ASSIGNMENTS.
 

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