Friday, May 24, 2013

Word-VBA-Error 5096: "PHABETI"

Ik was al een tijdje bezig met een applicatie gemaakt in Word 2007 met behulp van VSTO (Visual Studio Tools for Office). Door middel van deze applicatie kunnen gebruikers in slechts enkele muisklikken brieven aanmaken waarbij de data uit de back office wordt gehaald.

Op een dag ontstond bij het opslaan van een document de foutmelding Word-VBA-Error 5096: "PHABETI". Deze foutmelding werd gegenereerd door het commando WordApp.SaveAs. In onze situatie lag de oorzaak van de foutmelding in een verandering van de huisstijl waarbij lettertypes waren veranderd. De gebruiker had het sjabloon aangepast naar de nieuwe huisstijl.

Na het nodige speurwerk bleek dat de melding ontstaat als lettertypes in het standaard sjabloon normal.dot afwijken van een documenten sjabloon. Zodra ook in het standaard sjabloon de nieuwe lettertypes waren opgenomen was de foutmelding weg. Je kan dit op elk moment doen door het dialoogvenster lettertype op te roepen (zie screenshot 1).

screenshot 1

Vul vervolgens de juiste lettertype in en klik op de knop standaard (screenshot 2).
screenshot 2

English version

I was working for a while on an application made ​​in Word 2007 using VSTO (Visual Studio Tools for Office). Through this application users can create letters in just a few clicks in which the data is retrieved from the back office.

One day when saving a document the error message Word VBA Error 5096: "PHABETI" appeared. This error was generated by the command WordApp.SaveAs. In our situation the the error was caused by a change in font styles. The user had changed de document template with the new font and fontsize.

After some research i found that the message occurs when fonts in the default template normal.dot deviate from the fonts in a document template. Once the new fonts were included in the default template the error was gone. You can do this at any time by calling the font dialog box (see screenshot 1).

Set the right font and fontsize and click 'Default'.


Comodo Code Signing Certificate

From application and verification to installation and signing Date: Januari 2018 Operating system: Windows 10 (64-bits) Browser: Firef...