在为我的公司创建一个新的、自动填充广告的签名时,我偶然发现了同样的问题。从我在互联网上发现的内容以及还建议的内容来看,当使用与 Word 在其 Normal.dot(m) 中的相同字体制作签名时,就会出现问题。
例如; 我的公司希望 Arial 10 作为 Word、Excel 和 Outlook 中的默认字体。所以当然我修改了所有需要的文件并安排了一个 GPO 来完成这个。一切正常,Word 等将 Arial 作为默认字体。
现在,当我运行我的 signature.vbs 脚本时,该脚本还指出字体应该是 Arial,结果总是奇怪的是 Calibri 作为字体。我玩了一会儿,发现我可以使用除 Arial 之外的任何其他字体,它会工作,除了 Arial。
这让我发疯了 2 天,然后它击中了我;- 如果我在用户配置文件中放置一个临时 normal.dot(m)(使用 Calibri 作为默认字体),然后使用 VBS 创建签名,然后在配置文件中放置正确的 Normal.dot(m),该怎么办?
事实证明,这成功了。因此,我取出 Normal.dot(m) 的文件放置 GPO,并将临时副本、运行 vbs、最终副本集成到我的批处理脚本中,该脚本也触发了 signature.vbs。
这是我的批处理代码,您可能必须根据自己的需要进行调整,但它提供了基本概念。我已经添加了评论的英文翻译,所以你不必学习荷兰语:)
希望这可以帮助您和仍在寻找“解决方案”的任何人。
@echo off
REM Verwijder alle default word templates in het userprofile (niet meer via GPO)
REM Remove all default Word templates in the userprofile (no longer through GPO)
DEL /F /Q %userprofile%\AppData\Roaming\Microsoft\Sjablonen\Normal.dotm
DEL /F /Q %userprofile%\AppData\Roaming\Microsoft\Templates\Normal.dotm
DEL /F /Q %userprofile%\AppData\Roaming\Microsoft\Sjablonen\NormalEmail.dotm
DEL /F /Q %userprofile%\AppData\Roaming\Microsoft\Templates\NormalEmail.dotm
REM Check of het Handtekeningscript al gelopen heeft, zoja ga over tot plaatsen juiste normal.dotm
REM Check if the signaturescript already ran, if so copy the proper normal.dotm
IF EXIST %homeshare%\pvfsig.txt goto copynormal
REM Plaats een tijdelijke Normal.dotm ivm een conversie issue als je default Arial hebt (wordt Calibri)
REM Copy a temporary Normal.dotm in the profile so the conversion problem with the Default font won't occur.
COPY /Y /Z \\pvf\netlogon\Scripts\huisstijl\normal_met_calibri\Normal.dotm %userprofile%\AppData\Roaming\Microsoft\Sjablonen\Normal.dotm
COPY /Y /Z \\pvf\netlogon\Scripts\huisstijl\normal_met_calibri\Normal.dotm %userprofile%\AppData\Roaming\Microsoft\Templates\Normal.dotm
COPY /Y /Z \\pvf\netlogon\Scripts\huisstijl\normal_met_calibri\NormalEmail.dotm %userprofile%\AppData\Roaming\Microsoft\Sjablonen\NormalEmail.dotm
COPY /Y /Z \\pvf\netlogon\Scripts\huisstijl\normal_met_calibri\NormalEmail.dotm %userprofile%\AppData\Roaming\Microsoft\Templates\NormalEmail.dotm
REM Start Handtekening VBS script om de handtekening te genereren
REM Start signature VBS script to generate the signature
cscript \\pvf\netlogon\scripts\huisstijl\outlooksig_new.vbs
REM Verwijder tijdelijke Normal.dotm bestanden
REM Remove the temporary Normal.dotm files
DEL /F /Q %userprofile%\AppData\Roaming\Microsoft\Sjablonen\Normal.dotm
DEL /F /Q %userprofile%\AppData\Roaming\Microsoft\Templates\Normal.dotm
DEL /F /Q %userprofile%\AppData\Roaming\Microsoft\Sjablonen\NormalEmail.dotm
DEL /F /Q %userprofile%\AppData\Roaming\Microsoft\Templates\NormalEmail.dotm
REM Creeer een check bestand op de Homedirectory v/d gebruiker
REM Create a checkfile in the users homedirectory
echo pvf standaard handtekening is aangemaakt > %homeshare%\pvfsig.txt
REM Kopieeren van juiste normal.dotm bestanden (met Arial)
REM Copy the proper normal.dotm files into place
:copynormal
COPY /Y /Z \\pvf\netlogon\Scripts\huisstijl\normal_pvf_huisstijl\Normal.dotm %userprofile%\AppData\Roaming\Microsoft\Sjablonen\Normal.dotm
COPY /Y /Z \\pvf\netlogon\Scripts\huisstijl\normal_pvf_huisstijl\Normal.dotm %userprofile%\AppData\Roaming\Microsoft\Templates\Normal.dotm
COPY /Y /Z \\pvf\netlogon\Scripts\huisstijl\normal_pvf_huisstijl\NormalEmail.dotm %userprofile%\AppData\Roaming\Microsoft\Sjablonen\NormalEmail.dotm
COPY /Y /Z \\pvf\netlogon\Scripts\huisstijl\normal_pvf_huisstijl\NormalEmail.dotm %userprofile%\AppData\Roaming\Microsoft\Templates\NormalEmail.dotm
:end
EXIT