Sandbox Sample-MS Project - why nothing happened?

I got this sample from sandbox, but upon clicking, only MS project is running. What was it supposed to do? I just like to know what is the feature it tried to show, tq.

Sub Click(Source As Button)

Dim hwd

Dim diagram

Dim topnode

Dim commSession As NotesSession

Dim commServer As String

Dim commCurrentDatabase As NotesDatabase

Dim commCurrentDocument As NotesDocument

Dim commWorkspace As NotesUIWorkspace

Dim commcollection As NotesDocumentCollection

Dim count As Integer

Dim sessionid As String

Dim sessiontitle As String

Dim profile As notesdocument

Dim taskdb As NotesDatabase

Dim ws As New notesuiworkspace

Dim db As notesdatabase

Dim docnav As notesViewNavigator

Dim doc As notesdocument

Dim projectdoc As notesdocument

Dim selecteddocs As notesdocumentcollection

Dim view As notesview

Dim loopdoc As notesviewentry

Dim assignedto As NotesName



Dim msproject As Variant

Dim viewname As String

Dim projidcount As Integer

Dim lastdocument As String



Set commSession = New NotesSession

Set commCurrentDatabase = commSession.CurrentDatabase

Set commWorkspace= New NotesUIWorkspace



Set profile = commCurrentDatabase.GetProfileDocument("profileDatabaseSetup")



Set taskdb = commSession.GetDatabase("", profile.mailfile(0))



sessionid = profile.sessionnumber(0)

sessiontitle = profile.sessionevent(0) & " - " & profile.sessionname(0)

viewname = "TodoByStatus"



Set view = taskdb.GetView ( viewName )

If view Is Nothing Then

	Msgbox "Folder Not Located"

	Exit Sub

End If



Set msproject = createobject("msproject.application")



msproject.visible = True



Call msproject.filenew(False, "", False, False)



Call msproject.displayalerts(False)



Set docnav = view.CreateViewNav



projidcount = 1



Set loopentry = docnav.GetFirstDocument



Do Until (loopentry Is Nothing)

	Set doc = loopentry.document

	Call doc.ReplaceItemValue("MSProjID", Cstr(projidcount))

	

	Call doc.save(True,False)

	

	Call msproject.settaskfield("Name", doc.subject(0), False, True, projidcount)

	Call msproject.settaskfield("Duration", projidcount, False, True, projidcount)

	Call msproject.settaskfield("Start", doc.StartDate(0), False, True, projidcount)

	Call msproject.settaskfield("Finish", doc.DueDate(0), False, True, projidcount)

	Call msproject.settaskfield("Estimated", "No", False, True, projidcount)

	Call msproject.settaskfield("Text1", doc.noteID, False, True, projidcount)

	Set assignedto = New NotesName( doc.principal(0) )

	Call msproject.settaskfield("Resource Names", assignedto.Common, False, True, projidcount)

	

	Call msproject.selectrow(projidcount, False, 1)

	

	

	projidcount = projidcount + 1

	

	Set loopentry = docnav.GetNextDocument(loopentry)

Loop



projidcount = 1

End Sub

Subject: can you link me where you got this Will? Thanks

Subject: RE: can you link me where you got this Will? Thanks

lotus advisor summit aug 27-31 2006phoenix, from sandbox, if not mistaken, hth. tq

Subject: Um, no.

It is not in the sandbox. It’s from my website, since I wrote the code and distributed the database.

Subject: Tq John, yes it is yours

sorry John, yes, your name is in the database. do you mind telling me why is it sometime it works, sometime doesn’t, do I have to create the to do list near to current date? tq.

Subject: you have not configured the database

the database is designed to be configured for your use … instead of hardcoding things. so, the following lines:

Set profile = commCurrentDatabase.GetProfileDocument(“profileDatabaseSetup”)

Set taskdb = commSession.GetDatabase(“”, profile.mailfile(0))

See what it is doing? It gets the profile document called “profileDatabaseSetup” and gets the value in the mailfile field. You can access the Database Setup from the actions menu. Put the path to your mailfile in the mailfile field and save and close the profile. Try it again. As long as there are tasks (no matter when the start or end date is) they will end up in project.

Subject: RE: you have not configured the database

i did change it, only one time it works, but after I change the date, than it no longer works. really interested to know what it can do… :frowning:

Subject: will, email me

jhead at psclistens dot com … change the email

Subject: Tq John, yes it is yours

sorry John, yes, your name is in the database. do you mind telling me why is it sometime it works, sometime doesn’t, do I have to create the to do list near to current date? tq.

Subject: Sandbox Sample-MS Project - why nothing happened?

Hi,I have worked extensively on Lotus Notes and MS Project integration. This code takes item from your To do list and populates in MS Project.

Add some To do taks in your To do list and then run this code.

Best Regards,

Munish Kaushik

Subject: RE: Sandbox Sample-MS Project - why nothing happened?

I did tried it, but it does not work. perhaps you can check at your end, just to confirm what it supposed to do?

tq.