SOLVED

missing document template in the document library

Brass Contributor

Hello,

 

I added my custom  document template here in the library.

my simple question is do you know where the documents are placed?  I tried searching it and cannot find any in the site.

 

hunk0227_0-1669290022534.png

 

Thanks,

Hunk

 

6 Replies
There is a hidden "forms" folder inside of your document library. The templates are stored in there but are itself also hidden....

So, you need to reconstruct the url like
https://tenant.sharepoint.com/sites/mysite/documents/forms/presentation.pptx

@hunk0227 I wasn't sure whether you meant you couldn't see your template in the New menu or that you wanted to know the location of where they are stored. Once you've added your template it will appear in the New menu. But there is no location where you can see it; system files like aspx files and document templates are stored in the library but Microsoft have made them not visible or accessible. To edit or delete a document template you've added click the Edit New menu button above Add template. A panel will open on the right of the screen. Click the 3 dots next to your template and select Edit or Delete.

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

@RobElliott,

Thank you for the information.
I understand that features, I just wanted to know where those files are stored.
So does it mean that we cannot just copy/migrate files created in this function and we need to grab it one by one?

Br,
Hunk
Yes that's correct.
best response confirmed by hunk0227 (Brass Contributor)
Solution

@hunk0227 


So does it mean that we cannot just copy/migrate files created in this function and we need to grab it one by one?


Through the UI? Not really, perhaps with some migration tools.
You were once able to do this with SharePoint Designer or if you access the document library through Webdav. But this does not really work well with SharePoint Online and modern authentication. 

But you can list/download/update the "templates" in the forms folder through PNP Powershell and automate the process

 

# List all files in the "forms" folder
Get-PnPFolderItem -FolderSiteRelativeUrl "/Shared Documents/Forms" -ItemType File | Where-Object {$_.Name -notmatch '\.aspx$'}

# Download a specific template and save it in your local current directory
Get-PnPFile -Url "/Shared Documents/Forms/mytemplate.pptx" -Filename "mytemplate.pptx" -Path . -AsFile

# Reupload an updated Version of the template.
Add-PnPFile -Path '.\mytemplate.pptx' -Folder "/Shared Documents/Forms/"

# Or put it all together to download all files from the hidden forms folder

Get-PnPFolderItem -FolderSiteRelativeUrl "/Shared Documents/Forms" -ItemType File| Where-Object {$_.Name -notmatch '\.aspx$'} |foreach-object {

Get-PnPFile -Url $_.ServerRelativeUrl -Filename $_.Name -Path . -AsFile

}

 






Thanks @SvenSieverding this really helps.
Too sad why Microsoft make this default function complicated. :)

1 best response

Accepted Solutions
best response confirmed by hunk0227 (Brass Contributor)
Solution

@hunk0227 


So does it mean that we cannot just copy/migrate files created in this function and we need to grab it one by one?


Through the UI? Not really, perhaps with some migration tools.
You were once able to do this with SharePoint Designer or if you access the document library through Webdav. But this does not really work well with SharePoint Online and modern authentication. 

But you can list/download/update the "templates" in the forms folder through PNP Powershell and automate the process

 

# List all files in the "forms" folder
Get-PnPFolderItem -FolderSiteRelativeUrl "/Shared Documents/Forms" -ItemType File | Where-Object {$_.Name -notmatch '\.aspx$'}

# Download a specific template and save it in your local current directory
Get-PnPFile -Url "/Shared Documents/Forms/mytemplate.pptx" -Filename "mytemplate.pptx" -Path . -AsFile

# Reupload an updated Version of the template.
Add-PnPFile -Path '.\mytemplate.pptx' -Folder "/Shared Documents/Forms/"

# Or put it all together to download all files from the hidden forms folder

Get-PnPFolderItem -FolderSiteRelativeUrl "/Shared Documents/Forms" -ItemType File| Where-Object {$_.Name -notmatch '\.aspx$'} |foreach-object {

Get-PnPFile -Url $_.ServerRelativeUrl -Filename $_.Name -Path . -AsFile

}

 






View solution in original post