Forum Discussion
Template References to offline SharePoint On-Prem Server
Hi All,
We have encountered an issue after migrating from SP 2016 into SP Online and taking the old on-prem server offline. Some templates that we have used in the past (.dotx, etc.) have references to the old SP2016 environment embedded in them. Since we have shut down our old 2016 Server, documents created with these templates take minutes to load as it appears the template reference 404's attempting to access the old server to check if the template exists. The file is loads completely fine after the check fails, as expected, because it is now a file and not the template.
I have 2 Questions:
- Does anyone encountered this or something similar and know of a way to resolve this issue?
- Are there ways to tell which files have been affected by this issue? We have files both locally and in SP Online that exhibit this behavior, which could mean that there are different ways to resolve this.
Thank you,
4 Replies
When documents created from old .dotx templates try to load in SharePoint Online, they still contain an internal reference to the original SharePoint 2016 template library. Since the on-prem server is offline, Office applications attempt to resolve the template path, fail with a 404, and then open the document normally. The delay happens during that lookup process.
This behavior is expected because the template metadata is stored inside the file. Taking the server offline does not remove that reference.
The two practical approaches are:
- Replace the template reference by opening each template, attaching a new template, saving, and re-publishing it. New documents created from that template will no longer point to the offline server.
- Identify affected documents by scanning for URLs in the document properties or by using Office’s “File > Info > Related Documents” metadata. Files that contain embedded template paths pointing to the old SP2016 server will show this delay.
There is no automatic migration mechanism that strips old template URLs, so cleanup must be done either on the templates or by bulk document processing.
- virendrakIron Contributor
lzetaruk The issue you described with SP2016 on‑prem is a well‑known behavior. When Word documents are created from templates stored in your old SharePoint 2016 environment, the full path to the template file is embedded in the document. After you shut down the 2016 server, Word still tries to resolve that path each time the document is opened. Because the server no longer exists, Word attempts to connect, times out, and then finally opens the document. That’s why you see the delay.
The resolution is to update or remove those embedded template references. You can do this manually by re‑attaching the document to a valid template in Word (via the Developer tab or Options > Add‑Ins > Templates) or use PowerShell scripts that scan for the AttachedTemplate property and replace the old server path with the new SharePoint Online library path.To identify affected files, you can either check manually in Word (Developer tab > Document Template) or run a script to flag any documents that still reference http://oldSP2016/.... Files that take unusually long to open are also a strong indicator.
Here are few articles which might help:
- Using Documents after a Server Move (Microsoft Word)
- How to fix slow opening Microsoft Word documents because of invalid network paths
- Updating Many Template References (Microsoft Word)
“If my post solved your issue or answered your query, please mark it as a Solution and give it a Like.”
- lzetarukCopper Contributor
Hi virendrak ,
Thank you for your quick reply!
I have checked some of the affected files (both manually and programmatically), but both versions show the "Normal.dotm" template file stored locally, not the reference to the old SharePoint site. Opening the file still attempts to access the old SharePoint URL.
- Are there any other locations that this URL could be stored?
- Is there a way to change this link for files in both SharePoint Online and locally en masse?
Thank you,
- lzetarukCopper Contributor
Hi virendrak ,
Thanks for your quick response and suggestions!
However, after following your suggestions to look at the templates (both manually and programmatically), the Template Path points to the default "Normal.dotm" file locally, not the old SharePoint URL.
Loading the File still attempts to access the http://oldSP2016/... URL, which has me more than a little confused.
Is there another place where this location information is stored? As well:
- Can this be changed for both files stored in the new SharePoint Online environment and locally?
- Is this solution something that you expect can be done at a large scale?
Thank you,