Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a Visual Sourcesafe database using outlook VBA

Status
Not open for further replies.

bodmin

Technical User
Apr 1, 2004
98
GB
Hi guys,

I am trying to create some macro code for outlook that will allow the system to open a sourcesafe database and search through the projects looking for files with a particular label.

So far I am struggling with the early declaration bits of the code as I can not get the sourcesafe open command to work, can anyone give me any pointers on how I can get this working. The code is as follows:

Dim fso As Object
Dim myDB As New SourceSafeTypeLid.VSSDatabase

Public cVSSRootProject As String
Public cSourceSafeINI As String

cVSSRootProject = "$/"
cSourceSafeINI = "\\Ukteserv01\Sourcesafe\PresDevelopment\srcsafe.ini"

'— The SourceSafe User ID/Password.
Public Const cVSSUserName As String = "andrews"
Public Const cVSSPassword As String = "andi"

myDB.Open(cSourceSafeINI, cVSSUserName, cVSSPassword)

The problem is that the code is now reporting a syntax error on the final line where I am trying to open the database.

Any help would be greatly appreciated.
 
With a bit of further trial and error I have got the sourcesafe database to open, to do this I had to remove the username and password optional fields and this seems to have corrected the syntax problem.

This will allow me to carry on working for now but has anyone got any ideas why the username and password parameters would cause the statement to have an error?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top