Hello stullhe104,
The error this time is caused by the possibility that the MSProject
instance
is working offline (see the second point in my last reply). My colleague
Ji
Zhou [MSFT] and I are searching for the possible solutions of automating
Project to connect to the Project server. We will get back to you as soon
as
possible.
Regards,
Jialiang Ge (
[email protected], remove 'online.')
Microsoft Online Community Support
=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you.
Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
This posting is provided "AS IS" with no warranties, and confers no
rights.
=================================================
Thanks for the reply. When I provide my Windows Auth userid and
password I
get the same error.
.FileSaveAs(Name:="<>\MyProject.Published", UserID:="DOMAIN\USERID",
DatabasePassWord:="mypasword", FormatID:="")
--
stullhe104
:
Hello stullhe104
The error happens for lack of the credential information. When you
record
macros, Project does not record the user id and password information
for
sake of security. Thus, you see the UserID and DatabasePassWord
parameters
be "" in the code. We would need to manually specify their values.
In addition, you would need to make sure that your Project is not
working
offline, and the user logged on has the proper permission. Otherwise,
an
error message "You do not have sufficient permissions to add new
projects
to
Project Server" will be popped up. Project allows us to choose the
account
when it starts up.
Regards,
Jialiang Ge (
[email protected], remove 'online.')
Microsoft Online Community Support
=================================================
Delighting our customers is our #1 priority. We welcome your comments
and
suggestions about how we can improve the support we provide to you.
Please
feel free to let my manager know what you think of the level of
service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
This posting is provided "AS IS" with no warranties, and confers no
rights.
=================================================
In trying to write VB.Net code to control MSProject 2003 it was
recommended
that I record a macro in MSProject and transfer the code to VB.Net.
When
recording the FileSaveAs (to the project server) I get the
following:
FileSaveAs(Name:="<>\MyProject.Published", UserID:="",
DatabasePassWord:="",
FormatID:="")
However, this gives me the "useful" error message "An unexpected
error
occurred with the method." when applied to my application in the
following
way:
Dim prj As New Microsoft.Office.Interop.MSProject.Application
With prj
.FileOpen("c:\prjTemplate.mpp")
.ActiveProject.Name = "DOG"
.ActiveProject.Comments = "CAT"
.FileSaveAs(Name:="<>\MyProject.Published", UserID:="",
DatabasePassWord:="", FormatID:="")
.FileClose()
End With
Any help would be appreciated.