View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Saving files to Sharepoint site: error 1004 (can't save file)

1) You need to be a member or maybe ADMIN of the site to save to the site
this way.
2) I've had to map sharepoint drives to a drive letter and save that way.
I don't believe I've ever had success using the URL
3) 1004 error sounds like you don't have a object wkbTarget. Add this
before the save and see if it helps

if WkbTarget is nothing then
Msgbox("No workbook defined.")
else
'Save your workbook

end if


--
HTH,

Barb Reinhardt



"Harry" wrote:

I am trying to save files to the "Shared Documents" directory on a Sharepoint
site.

the code wkbTarget.SaveAs(URL of SharePoint Site) results in a 1004 error:
File Not Saved.


My URL is (redacted to maintain confidentiality)
"https://sharepoint.xxx.com/xxx/xxx/xx/xxx/Shared%20Documents/Excel_Filename.xlsx" .

It worked once, then I deleted the file from the site. Since then, it
hasn't worked.

Can someone point me in the right direction?

many thanks,
Harry