I recently came across an issue with Office 2016 and Citrix XenApp where by a user’s Word autocorrect entries would be wiped intermittently during a live session. After a quick search I found that Microsoft’s product support have identified this as a known issue and have provided a work around ; https://answers.microsoft.com/en-us/office/forum/office_2016-word/normal-template-wiped-again/a96dba06-68f7-40e8-a1a2-55ddef1bcca7?auth=1.

The issue here is that the work around requires users to access their AppData folder and modify files based on date, not something you would want Citrix user sessions to have to do.

So I came up with a work around for my environment using PowerShell.

Step1. Backup AutoCorrect Entries

For this process I use the following PS script running as part of a log off script process in a GPO. The backup process will only replace previous backups whereby the file size exceeds that of the previous backup (as users tend to keep adding autocorrect entries and thus the file size increases);

Step 2. Restoring AutoCorrect Entries

The following PowerShell script can be run automatically via a log on PS script in a GPO or in my instance I opted to publish the script via XenApp so that users can restore data when an issue arises;

Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.99
Created on: 01/03/2016 12:32
Created by: Maurice.Daly
Word Autotext Backup Script

$AutoTextLocation = $env:APPDATA + "\Microsoft\Templates"
$BackupLocation = [environment]::GetFolderPath("MyDocuments") + "\AutoTextBackup"

If ((Test-Path -Path $BackupLocation) -eq $false)
$AutoCorrectFiles = Get-ChildItem -Path $AutoTextLocation | Where-Object { $_.Name -like "Normal*.*" }
New-Item $BackupLocation -Type dir
Copy-Item -Path $AutoCorrectFiles.FullName -Destination $BackupLocation
$AutoCorrectFiles = Get-ChildItem -Path $AutoTextLocation | Where-Object { $_.Name -like "Normal*.*" }
foreach ($File in $AutoCorrectFiles)
if ((Get-Item -Path $File.FullName).Length -gt (Get-ChildItem -Path ($BackupLocation + "\" + $File.Name)).Length)
Copy-Item -Path $File.FullName -Destination $BackupLocation -Verbose


The PowerShell scripts assume that you using re-mapped My Documents as a backup location and that you want some form of interactivity during the restore process, i.e to advise them that Word and Outlook will be terminated and whether or not the restore process was successful. Obviously you can chop/change this as required but it does the trick.

Hopefully this helps some of you with this issue.



There are no comments.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.