Application Error in Word or Excel

When you insert a barcode from the TBarCode Panel your Word or Excel instance stops working. In the Event Log (run eventvwr on command line) you see an APPCRASH event with error code 0xC0000005 in the module MSVCR90.dll. This problem may occur after you have updated to Windows Version 10 (Version 1709).

When you open a document, which contains a bar code control your Word or Excel instance stops working. This problem occurs after you have updated to Windows Version 10 (Version 1803).

Replace ActiveX Controls with EMF Barcodes

Starting with version 10.9 of the add-in you can replace the barcode controls in your document with EMF pictures. This improves the program stability. For an easy upgrade of your documents to EMF barcodes you can use the conversion wizard (see add-in options).

This would be the preferred solution. If you cannot change to EMF bar codes, the alternative workaround would be to use the compatibility troubleshooter (see below).

Program Compatibility Troubleshooter

Run the Compatibility Troubleshooter (see links below) and enable Windows 7 or Windows 8 compatibility mode for the faulting Office application(Excel or Word).

In addition:

  • Make sure you have the latest Office service packs for your Office version installed.
  • Make sure you use the latest VSTO version and .NET version available.

TBarCode Office Listed under Inactive Application-Add-Ins

Office 2007

You need Service Pack 3 to be installed. You can download this service pack from Microsoft:

In several cases a new installation combined with cleaning the VSTO cache may be required. The cache cleaning script/tool can be downloaded here. Uninstall, execute the cache cleaning, then install again. Don't enable the "All Users" option with Office 2007.

After updating your Office installation you need to re-activate the Add-In: How to: Re-enable an Add-in That Has Been Disabled

Office 2010, 2013, 2016

Download the latest service pack (SP) for your Office version from here:

For instance, Office 2010 needs SP2 for the add-in to work correctly. Please verify also your Office version if you need an update.

After updating your Office installation you may need to re-activate the Add-In: How to: Re-enable an Add-in That Has Been Disabled

VSTO Runtime

In some cases it may help to update the Visual Studio 2010 Tools for Office Runtime (VSTO Runtime). You can download the VSTO Runtime installer from the link below. If this update helped in your case, please give us feedback and let us know (thanks!).

Roaming User Profiles

There were problems reported with Roaming User Profiles (e. g. you see "Faulting module name: KERNELBASE.dll" in the event log). Temporarily switch to a local user profile to see if the problem is caused by the roaming profile. After new logon or reboot try to activate TBarCode Office in Options - Add-In - Manage COM Add-ins. If TBarCode is not listed there, try a complete reinstall.

TBarCode Office Listed under Disabled Application-Add-Ins

Under specific circumstances Word disables Application Add-Ins completely, e.g. when the loading time exceeds a limit or when a fatal error occurred during loading.

  • First verify if you have installed the latest service packs for your Office (see also the links in the other FAQ on this page).
  • In several cases a new installation combined with cleaning the VSTO cache may be required. The cache cleaning script/tool can be downloaded here. Uninstall, execute the cache cleaning, then install again. Don't enable the "All Users" option with Office 2007.
  • Make sure you avoid Roaming User Profiles as they may cause instability with the add-in.

How to re-enable the Add-In is described here: How to: Re-enable an Add-in That Has Been Disabled

Add-In Not Loaded for Terminal Server Users with Restricted Permissions

Problem: The add-in can be loaded by an administrator - but not by a normal user with restricted privileges.

Users connecting through the Terminal Server have access permissions to the Remote Desktop (local) but are usually not allowed to make changes within the setup or parameters (in components, tools, applications, etc.).

The error when loading the add-in may also be due to the fact that these users are not authorized to read or execute the configuration file "machine.config"
(path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config).

As tests have shown: If you allow the affected users to read and write the machine.config file, the add-in may be loaded.


  • Granting Permissions to Remote Desktop Users (Local)
  • Granting permissions to read and execute the machine.config file (local)

Add-In is Only Available for the User who has run the Setup

After TBarCode Office installation, the add-in is only visible for the user who has installed the product (e.g. the Administrator), other users can not see the add-in. Use one of the two options below to solve this problem.

Register the Add-In VSTO File for the Actual User

In order to make the add-in available for another user, you have to register the Office VSTO files for the actual user account again.

To do so, login under the user account, switch to the installation folder - e. g.

C:\Program Files\TEC-IT\TBarCodeOffice 10\bin
and execute TECIT.TBarCode.WordAddIn.vsto and TECIT.TBarCode.ExcelAddIn.vsto with a double-click. Then restart Word and Excel. Now, the add-in should also be visible for the actual user account.

Register the Add-In for all Users in HKLM

TBarCode Office 10.4 (and later) offers an option for registering the add-in for all users in the setup program. This option will create an entry in the HKLM registry hive. If you currently have installed a previous version you have to uninstall it first.

Please note that only Office 2010 (and newer) support machine wide registering of VSTO add-ons. Users of Office 2007 would need this hotfix from Microsoft.

More detailled background information can be found here:

Installing Office Customization Error During Startup of Word/Excel

Exception Reading Manifest from Word/Excel VSTO File

During startup of Word or Excel you receive a System.Deployment.Application.InvalidDeploymentException with error message The manifest may not be valid or the file could not be opened.

The following updates can solve the problem:

  • Update to .NET Framework 4.6 from here.
  • Update the Visual Studio 2010 Tools for Office Runtime (VSTO Runtime) from here.

'DeploymentProviderUri Not Valid' and Other Error Messages

During startup of Word or Excel you receive a System.Deployment.Application.DeploymentException with error message Store metadata "DeploymentProviderUri" is not valid (or a different exception message).

The following solution is only for experienced users - no liability given! See also ClickOnce Application Fails to Update.
  • Rename the folder C:\Users\Username\AppData\Local\Apps\2.0 to C:\Users\Username\AppData\Local\Apps\2.0_old.
    This removes the ClickOnce file cache from the system and can influence also other Add-Ins or ClickOnce Apps.
  • Uninstall and install TBarCode Office new
  • The above cache folder will be recreated automatically.
  • Copy the content of the old folder into the new one.
  • Verify if everything works and then delete the 2.0_old folder.

Silent Setup Without User Interaction

To install TBarCode Office without user interaction, run the setup with the following command line arguments

TBarCodeOffice.exe /i /q
Starting with TBarCode/Office 10.5.7 the "All Users" option is selected automatically if Office 2010 (or newer) is found.

Install For All Users

TBarCodeOffice.exe /i /q /ComponentArgs "TBarCode Office x64":"ADDIN_ALLUSERS=1"
                         /ComponentArgs "TBarCode Office":"ADDIN_ALLUSERS=1"

The all users option is available starting with TBarCode Office 10.4.

Install Only for Current User

TBarCodeOffice.exe /i /q /ComponentArgs "TBarCode Office x64":"ADDIN_CURRENTUSER=1"
                         /ComponentArgs "TBarCode Office":"ADDIN_CURRENTUSER=1"

The current user option is available starting with TBarCode Office 10.8.3.

Install Only Excel Add-In

TBarCodeOffice.exe /i /q /ComponentArgs "TBarCode Office x64":"ADDLOCAL=Feat_ExcelAddIn"
                         /ComponentArgs "TBarCode Office":"ADDLOCAL=Feat_ExcelAddIn"

Log Setup

You can create two kinds of log files by calling the setup with the following arguments:

TBarCodeOffice.exe /i /Log /LogFile wlog.txt

TBarCodeOffice.exe /ComponentArgs "TBarCode Office x64":"/l*v clog.txt" 
                   /ComponentArgs "TBarCode Office":"/l*v clog.txt"

No Barcode Add-In available on Windows XP

Consider this tip if the barcode add-in was installed but fails to load (= not visible) in Word 2007 or 2010 on Windows XP.

Most likely you need to install the Download Primary Interop Assemblies (PIA) manually. These assemblies can be downloaded as an extra package from Microsoft:

  1. First install the Primary Interop Assemblies package.
  2. Then start Microsoft Word 2007 and open the Word Options.
  3. Switch to the Add-Ins tab, then select COM Add-ins from the Manage menu and click on Go...
  4. Activate the entry TEC-IT TBarCode Office (Word Add-In) in the upcoming COM Add-ins dialog and confirm with OK.
  5. After restarting the Add-Ins tab will appear and the TBarCode Office Add-In will be available.

Crash in OSF.DLL When You Close Word or Excel

The crash occurs in the OSF.DLL (a DLL from Microsoft) and not directly in our software. We did some research and have seen that (independent from installation of our product) there may be several reasons:

  • Some people located the problem in the Antivirus software they have used.
  • For some other people it helped to sign out of the MS Office account.
  • In one case the problem was the graphic card / graphic card driver (it worked on a different PC with different hardware).

We have feedback that in one case an older version of TBarCode Office (10.5.) does not show up this problem. You can download it from here. Be aware that this older version lacks some of the features and fixes introduced in newer versions.