The following code writes the values "Line1" though "Line4" each separated by
a carriage return and a line feed for every task in a project. See if this
gets you started. The end result is a stack:
Line1
Line2
Line3
Line4
I include an original line to write Line1 & 2, then I append it in the next
line so you can see how it was done.
Public Sub PlayWithTaskNotes()
Dim tsk As Task
For Each tsk In ActiveProject.Tasks
tsk.Notes = "Line1" & vbCrLf & "line2"
tsk.AppendNotes (vbCrLf & "Line3" & vbCrLf & "Line4")
Next
End Sub
Should you have other questions, it may be better to post into the Developer
newsgroup as some of the vba guru gurus hang out there. We all read this
group too, you may get other responses "Over there"
If i understand correctly, I think you need to programatically open your CSV
file, hunt for your task Unique ID and read the strings you want into
separate variables. Then use the Notes and AppendNotes properties/methods to
create your notes on the desired tasks.
For additional info, you can reference tasks directly by their UniqueID:
activeproject.Tasks(i).Notes where "i" is the task unique ID that you have
divined by some method.
From the Object browser, the following values may be of interest:
vbCrLf (carriage return and line feed) = Chr(13)+Chr(10)
vbCr (carriage return) = Chr(13)
vbLf (Line feed) = Chr(10)
vbNewline (same as vbCrLf) is Chr(13) for MAC users
vbTab = Chr(9) not supported by .Notes
vbBack = Chr(8) not supported by .Notes
vbFormFeed (new page) = Chr(12) is note supported by Windows.
--
If this post was helpful, please consider rating it.
Jim Aksel, MVP
Check out my blog for more information:
http://www.msprojectblog.com