Hi everybody,
I have seen several examples on how to use the AddFile method. I have tried using it with both the PPFILE and PPPROJECT objects unsucessfully. One difference I noticed between two examples was the use of the ServerLocation property. It is unclear whether this needs to be set on the PPFILE object. There is no documentation on this. I thought that if you are using PPFILE.AddFile or PPPROJECT.AddFile, the destination is know based on on their ServerLocation properties. Here is some sample code using both objects, does anyone have any ideas what's wrong?
Private Sub upload_test_Click()
Dim buzzsawSession As New PPSession
Dim buzzsawFolder As New PPFOLDER
Dim localFile As New PPFILE
Dim buzzawProject As New PPPROJECT
buzzsawSession.LogIn username.Text, password.Text, webfolders.Text ''' access values in controls on form
Set buzzsawFolder = buzzsawSession.GetResource("/southwest_region/colorado/archive") 'folder
Set buzzawProject = buzzsawSession.GetResource("/southwest_region/colorado") 'project
localFile.LocalPath = "t:\drawings\filelist.txt"
localFile.name = "filelist.txt"
localFile.ServerLocation = buzzawProject.ServerLocation + "archive" ''' have tried with and without BOOM no work!
buzzsawFolder.AddFile localFile 'CRASHES
localFile.ServerLocation = buzzawProject.ServerLocation
buzzawProject.AddFile localFile
buzzawProject.Upload 'CRASHES
Set buzzawProject = Nothing
Set buzzsawFolder = Nothing
Set localFile = Nothing
buzzsawSession.LogOut
Set buzzsawSession = Nothing
End Sub
HELLPPP!!!!!!