Nov 24 2022 03:47 AM
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.
Thanks,
Hunk
Nov 24 2022 04:00 AM
Nov 24 2022 04:40 AM
@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)
Nov 24 2022 07:09 AM
Nov 24 2022 07:44 AM - edited Nov 24 2022 07:45 AM
Solution
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
}
Nov 24 2022 11:44 PM
Nov 24 2022 07:44 AM - edited Nov 24 2022 07:45 AM
Solution
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
}