SetOfficeFriendlyName() - Set the display name on the title bar of Office applications

Post your working scripts, libraries and tools for AHK v1.1 and older
william_ahk
Posts: 486
Joined: 03 Dec 2018, 20:02

SetOfficeFriendlyName() - Set the display name on the title bar of Office applications

Post by william_ahk » 09 Sep 2021, 07:04

When I showcase anything that involves Excel or Word, the name displayed on the title bar has always been a privacy breach. So I wrote a function to change the display name on the title bar by modifying registry.
EXCEL.png
EXCEL.png (8.79 KiB) Viewed 422 times

Code: Select all

SetOfficeFriendlyName(FriendlyName) {
    KeyName := "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Identity\Identities"
    Loop, Reg, % KeyName, K
    {
    RegWrite, REG_SZ, % KeyName "\" A_LoopRegName, FriendlyName, % FriendlyName
    }
    return !ErrorLevel
}

msgbox % SetOfficeFriendlyName("#####") ? "Success" : "Failed"

Return to “Scripts and Functions (v1)”