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


Thanks Barb.

Actually, I figured out a workaround.
Part of the project was to save the file in a mapped folder, and on a
Sharepoint site.
When I did it this way, I got errors.
However, when I saved it to the Sharepoint site first, it succeeded.
I got the errors when saving to Sharepoint after first trying to save to a
mapped folder I didn't have permissions to.

I've mever mapped a Sharepoint path to a drive letter. How would I go about
doing this? (this seems a bit off topic from Excel, but still, a valid
question.)

thanks,
Harry


"Barb Reinhardt" wrote:

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