I am currently working on a project in which I add docx files to the Layout folder in Visual Studio and then use these ducment files to create content types.
The problem is that I cannot get the document files programmatically. Using a web browser, I can get the files, but not using web.GetFolder () ;. The code runs in the function receiver when the function is activated.
SPSite site = properties.Feature.Parent as SPSite;
SPWeb web = site.RootWeb;
SPFolder docTempFolder = web.GetFolder("_LAYOUTS/Projekt/DocumentTemplates");
This code gives me a collection with null files.
What am I doing wrong?
Thanks for the help.
source
share