I am currently working on very old project, which is based on Delphi 5. When I am trying to open new Word document on x64 system, I recive this error:

According to MSDN, the source of problem might be the version of my Office (x64). In application we use TWordApplication object to manage Word invoking. Is there any solution for that problem? On Office x86 everything works fine.
This is part of the code:
Word := TWordApplication.Create(nil);
Word.ConnectKind := ckNewInstance;
Word.AutoQuit := True;
Word.Connect;
Word.Options.CheckSpellingAsYouType := False;
Word.Options.CheckGrammarAsYouType := False;
Word.Options.SuggestSpellingCorrections := False;
Word.Options.CheckGrammarWithSpelling := False;
Word.Options.ShowReadabilityStatistics := False;
Word.Options.IgnoreInternetAndFileAddresses := False;
Word.Options.IgnoreUppercase := True;
Word.Options.IgnoreMixedDigits := True;
Word.Options.ReplaceSelection := True;
The problem appears to be in the VBA code attached to your document rather than the Delphi code. Specifically a hidden module named API is implicated. Perhaps this is in a template or an add-in or an auto start.
Hidden modules are protected which suggests that you may not be able to modify the module. You could try contacting the author of the protected module or perhaps removing whatever it is that introduced this module.
Reverting to 32 bit Office is an easier solution. This will require you to uninstall 64 bit Office first since the two editions do not co-exist.