Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7544311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:38:34+00:00 2026-05-30T08:38:34+00:00

I am just upgrading some old code written in Delphi 6 to Delphi XE2.

  • 0

I am just upgrading some old code written in Delphi 6 to Delphi XE2. Unfortunately the code references a Word97 COM object for generating some .doc documents. There is a direct uses clause of Word97 in the code.

I have to keep the document generated in the same Word format as it is used by an old Crystal Report and another 3rd party app which requries that format of the document.

So, to the question. Because I am using the Word97 in the uses clause, the compiler complains about Types of actual and formal var parameters must be identical whenever an EmptyParam variable is used. This is coming straight out of the Word97.pas source file. This is because EmptyParam is now declared as a function and not a variable.

what is the best way to deal with this? Should I copy the Delphi 6 source files (Word97.pas et al) say into my local directory, directly add them to my project, together with System.Variants.pas and change the Compiler Directive of my app to include EMPTYPARAM_VAR? I haven’t tried that, but hopefully it would declare EmptyParam as a variable then. Or perhaps there’s an easier solution.

Thanks

EDIT

Here’s a little more background info, even though I have accepted an answer, for future reference. Here’s an example of the code (AddClaimsLetter is the “Application” COM object – ie TWordApplication):

AddClaimsLetter.Documents.Open(Wordfile, EmptyParam, EmptyParam,
                        EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam,
                        EmptyParam, EmptyParam, EmptyParam, EmptyParam);

Without changing anything, the EmptyParam arguments here failed at compile time stating “E2033 Types of actual and formal var parameters must be identical”.

However, because I wanted to keep Word97 (which is in OCX/Server in Delphi 6 Ent. installation folder), I did need to copy the .pas files into my local project file and declare a variable that was used in place of EmptyParam (because these files attempted to compile too and I got the same compiler error as above).

So all working now, but I might discuss with management upgrading to a later version of Office for this App!

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T08:38:35+00:00Added an answer on May 30, 2026 at 8:38 am

    I quick workaround for the problem might be to declare a local variable of type OleVariant and assign it the result of the function EmptyParam.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My company's main application is mostly written in C++ (with some Delphi code and
I have a Delphi 2006 app that I am adding code to process some
I'm currently doing some redesign of a website, basically just upgrading it to a
I just recently upgraded to FluentNHibernate 1.2 which uses NHibernate 3.1. After upgrading some
We are just upgrading our ASP.Net shop implementation (from simple one) to structure that
Not so much a question as an observation... I'm just upgrading to SQL Server
Just how much slower are events? I have written a streaming XML parser (that
just switched to iOS 4 on my iPhone 3GS and some of my apps
I have a quite old templating system written on top of ERB. It relies
I have an app that I'm upgrading from some beta bits - and my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.