I am using a short piece of code that allows users to reset their Word username and initials to the company name for consistency when using Track Changes.
If Application.UserName <> "Company Name" Then
Application.UserName = "Company Name"
Application.UserInitials = "CN"
End If
However whenever the code runs to change the username, a warning is displayed "The setting could not be created" and the code is paused, when users click OK in the warning dialog, the code continues and the username is changed.
How can I either disable the warning or prevent it being displayed?
I have tried using Application.DisplayAlerts = wdAlertsNone before Application.UserName = "Company Name" but this doesn't work.
- Edited by James S Smith 15 hours 45 minutes ago spelling error