I've been working with SharePoint 2010 with no problem using VBA and accessing the folders via a simple path
\root\site\folder , structure.
I've just had a new site created in SharePoint 2013, and using the same technique doesn't work.
I can add a network location in this format
https://server/sites/Shared Documents, and can open that OK with file explorer, but when I pick up that string from my vba using a filesystemobject, I just get path not found.
If I map a network drive letter, for that path, the code works OK, but the path isn't found if I use the full https://server etc.
My guess is that it's something to do with changing from http to https on the move to SharePoint 2013
Anyone come across this before?
The actual code runs in Access 2013 and generates a full list of all the files in all the subfolders, and the ONLY problem now is that the filesystemobject.getfolder cannot find the path https://server/sites/Shared Documents (but will if I map all that to drive W:)
Any clues or suggestions welcome.
Thanks
Just in case anyone else has this, in my case, SharePoint 2013 needs
"#SSL\DavWWWRoot" added to the path, just before the "\Sites"
I found this by close examination of the path created by the drive mapping.
Related
The users have documents in Sharepoint document library. I need to be able to get the urls of these documents easy within Visio. Would I need to write something in VBA which gets the urls of these documents from Sharepoint, or is there an easier option ?
I have looked at the net use command so they can map a drive but that does not give the url.
anyone done anything like this before ?
SharePoint exposes XML interfaces that you can use to determine elements in a table or items in a library (which is a known and static location in SharePoint).
What you can use and how you access it will depend on your version of SharePoint and how it is configured on your network. However, there are plenty of examples on the internet that you can search in your favourite search engine (Alta Vista anyone?) which will get you started with some code. I expect you will have some specific questions once you start coding.
It has been a while since I did this.
When I open Microsoft Visual Basic for Applications 7, I see the project window. I.e. file1.xla, file2.xlam, etc. If I have multiple files names file1.xla, how do I know which one I'm looking at? I can't find the path to the file in the IDE.
I have some Excel plugins installed, which might be why some files continuously show up in the list.
In the Immediate Window, you can type:
?Workbooks("File1.xla").path
for example.
You can get the path of the currently active VBProject by using:
Application.VBE.ActiveVBProject.FileName
You can also get all paths by looping through the Application.VBE.VBProjects collection.
I've searched around for some answers to this, but nothing I found seemed to work. I'm good with VBA, but Sharepoint is not my cup of tea. We have a corporate Sharepoint site on the web (https) where different regions submit metrics using Excel. Each Excel file is placed in the region's respective folder.
What I want to be able to do is use a local workbook to navigate to the Sharepoint site, go through the folders, open each Excel workbook, and aggregate the numbers together. The closest I've come so far is this.
However, let's say my site is:
[https://teams.mycompany.com/SubTeamFolder/Forms/AllItems.aspx.]
Nothing gets returned when I set the site variable to this in the code from the link above. If I set the site variable to something like:
[https://teams.mycompany.com/SubTeamFolder/AllItems/]
it throws error
-2147217895
.
I'm open to other approaches here. Like I said, this one seemed the most promising till I hit this wall.
Just as an FYI for those who come across this, here is how I worked through this. In the link submitted by #ARich, I went towards the bottom and used the Export to Excel functionality. This let me see the underlying path for my objects. I was then able to use the code I linked to in my original post to see the underlying folders. If you need to, insert a couple of breakpoints once you successfully connect to your target Sharepoint site to follow along with the recursive movement from parent to child object. Taking it a step further, you can then open the files using this.
When setting up local synchronization with a Sharepoint 2010 site using Sharepoint Workspace, where are the local files stored? More importantly, how can I change the storage location?
There is a folder-like object created under username\Workspaces, but when checking the path in the explorer address bar, it shows simply username\Workspaces, unlike other folders that show as C:\Users\username\xxxx. Right clicking the folder only provides the option to open in new window - it can't even be deleted! There are no options for setting storage location within the Workspace application itself.
Using an SSD system drive, I don't have the space to put all this data on C:. Only part of my user profile has been relocated to other drives, so the default for new items is still C:. Without a knowledge of the real path where this is stored, I can't even use junction points to redirect.
Much web searching has revealed nothing on this subject. Your help is appreciated.
the data is stored within the users profile. I don't think taht you're able to relocated the synched database. The synchronized data isn't encrypted or password protected. So you should consider to activate profile encryption within your organization.
In addition to the location you aren't able to activate any kind of OOB protection for the local SQL CE which is responsible for storing the synched data!
The default location is %localappdata%\Microsoft\Office\14.0\OfficeFileCache.
The files in this location don't look like the actual files, and contain a lot of metadata.
Per Microsoft KB 2020636, you can change the location of the OfficeFileCache by adding an Expandable String Value named OfficeCacheLocation to registry subkey HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Internet with the new path. (This key is for Office 2010 only.)
In my organization, we reviewed the option of using Workspace for making files available offline, but in the end opted for a third party SharePoint add-on.
Since all of out users have Outlook and use it on daily basis, it made sense to have an Outlook sidebar available with all the users' relevant files. It also can synchronize a SharePoint library or folder and makes its items available offline using Microsoft Outlook, so we opted to use it instead of the OOB feature, which was too limited and had various security problems.
Just came across this and I think this will do the trick: How to change the default location of the Office 2010 Document Cache (NB: I haven't actually done it myself yet).
I don't have enough "reputation" on this site to post additional links, but if you search on the following, you can find more background:
OfficeFileCache Folder Size 3-4x Larger than Actual Content (SharePoint Workspace 2010)
Sharepoint Workspace Fills Hard Drive – WTF?
I'm pulling my hair out because I've run into the following problem with one of my clients:
My program uses extensive VBA automation in Word. Macros are saved in a specific Word template that is attached to each document. Some of the macros save the current document to a temporary folder under [User]/AppData/Roaming/... for further processing.
The client is using Win7 with Office2007 (Student edition). On the computer in question I keep getting an error with something like "No permission to save the file" (can't give exact error message because I've translated it from my language to English)
This happens when the macro tries to "SaveAs" the document.
The strange thing is that it happens only 8 out of 10 times - and not all the time. There are no special permissions set for the temporary folder I'm trying to save to.
I've tried changing Word security settings, tried adding the folder to the trusted folders list, tried using a different folder - to no avail.
The client's computer has Norton Antivirus (or Internet Security, I dunno) installed but temporary disabling it didn't solve the problem. (I know I should only be sure after a full uninstall but I can't do that on the client's comp)
Any help is appreciated!
Update: I've since found the exact error message in English: "Word cannot complete the save due to a file permission error."
I'm now looking on the web for similar forum posts but if you guys know something, please let me know. Thanks!
Is an antivirus or similar program running? On my development computers many similar problems went away when I changed from (vendor "X" security bundle) to ESET.