I’m trying to create new documents from templates using Office URI schemes. According to Microsoft’s documentation, you can add |s parameter to set where the new file should be saved by default.
The requirement says both template and save location must be on the same host. I’m using SharePoint Online group site for both locations but the default save path isn’t being applied.
When I click this link, Word opens a new document based on the template correctly. However, when I try to save the document, it doesn’t suggest the path I specified in the |s parameter.
Both URLs point to the same SharePoint site so hostname matching shouldn’t be an issue. Has anyone got this working or know what might be wrong with my approach?
Hmm that’s interesting, I’ve been messing around with office uri schemes lately too but haven’t tried the save parameter yet.
Quick question - are you testing this on the same machine/browser? I wonder if there’s caching or permission stuff interfering with the save path suggestion.
Also curious - when Word opens the new document, does it show any indication it “knows” about the intended save location? Like in recent locations or anything?
Oh and one more thing - have you tried shortening that output folder path? Sometimes SharePoint gets weird with longer URLs in my experience - might be a character limit or encoding issue.
Would be really helpful to know if anyone else has gotten the |s parameter working reliably because the Microsoft docs are pretty sparse on troubleshooting this stuff!
The hostname matching is stricter than just being on the same SharePoint site. I hit this exact issue last year while setting up document automation for our legal team. SharePoint’s URL redirection is usually the culprit - even when both paths look like they use the same hostname, SharePoint often redirects through different endpoints when processing the URI scheme. Try adding the |h parameter to explicitly specify the hostname. Also, make sure you’re testing with a fully synced SharePoint library, not just web access. I’ve found the save path parameter works way better when the target location is available through the desktop sync client. Office apps validate the save location when creating documents, and if there’s any confusion with path resolution, they’ll just fall back to the standard save dialog.
i’ve run into this too - the |s parameter can be buggy in sharepoint online. make sure you’re encoding the urls properly, especially spaces or special characters in your paths. also check that both locations have the same permissions. sometimes that’s the real problem even when they’re on the same site.