A
Alan Whitehouse
Hi,
I am using this VBA code within a Word macro button to create a task in
Window SharePoint Services 2003:
Public Sub AddNewTask()
' Retrieve the object root
Dim sws As SharedWorkspace
Set sws = ActiveDocument.SharedWorkspace
' Add a new task
sws.Tasks.Add "Check Receipt", _
msoSharedWorkspaceTaskStatusNotStarted, _
msoSharedWorkspaceTaskPriorityNormal, _
msoSharedWorkspaceTaskAssigneeDEMOSERVER\administrator
End Sub
The probem is with the last line
"msoSharedworkspaceTaskAssigneeDEMOSERVER\administrator" not working. I
apparentely need to enter in both the domain and username as it appears in
SharePoint tasks. This would be "DEMOSERVER\administrator". However, when
I put that on the line it breaks the words into "DEMOSERVER \ administrator"
with a space between each word and the slash and that does not work. I have
tried putting everything around it such as "DEMOSERVER\administrator",
(DEMOSERVER\administrator), ("DEMOSERVER\administrator"),
'DEMOSERVER\administrator', but none of those work.
I am not a programmer by trade but can anyone give me some suggestions here?
Alan
I am using this VBA code within a Word macro button to create a task in
Window SharePoint Services 2003:
Public Sub AddNewTask()
' Retrieve the object root
Dim sws As SharedWorkspace
Set sws = ActiveDocument.SharedWorkspace
' Add a new task
sws.Tasks.Add "Check Receipt", _
msoSharedWorkspaceTaskStatusNotStarted, _
msoSharedWorkspaceTaskPriorityNormal, _
msoSharedWorkspaceTaskAssigneeDEMOSERVER\administrator
End Sub
The probem is with the last line
"msoSharedworkspaceTaskAssigneeDEMOSERVER\administrator" not working. I
apparentely need to enter in both the domain and username as it appears in
SharePoint tasks. This would be "DEMOSERVER\administrator". However, when
I put that on the line it breaks the words into "DEMOSERVER \ administrator"
with a space between each word and the slash and that does not work. I have
tried putting everything around it such as "DEMOSERVER\administrator",
(DEMOSERVER\administrator), ("DEMOSERVER\administrator"),
'DEMOSERVER\administrator', but none of those work.
I am not a programmer by trade but can anyone give me some suggestions here?
Alan