Passing Info to Word Processing Template

Passing Info to Word Processing Template

I have a couple of questions about passing information to aword processing template and controlling the saving of the template toanother name. I appreciate any guidance you can provide.

Our application is written using Delphi 1. Our word processingapplication is WordPerfect.

What happens is: A user will bring up information about a client (name, DOB, etc.) on the screen. We want to set up the application so the user can press a button and be taken into the word processing template, and all the relevant information for the client will be imported from the Paradox table into the word processing template. We are having trouble automatically putting the information into the template. The closest we have gotten is having a box come up so the user can enter the info to be placed into each template field.

The second part of our problem (the part we have no idea where to find an answer for) is that after the user has”done his thing” in the template and saves it, we want to save thefilename and location back to our Paradox table so the system will keeptrack of where the reports exist. We are not concerned what the name isor where the file resides, as long as we can track it.

The only thing Icould think of doing is to copy the template to another file name thatthe application would assign, allow the user to update the new fileand save it, but not allow the user to rename thefile. The application runs on a Novell network. I would appreciate anythoughts you might have.

As far as the first problem is concerned, my feeling is that you’ll probablyhave to approach this with OLE. I haven’t worked with WordPerfect in thisrespect, but you should be able to get a set of commands that will place theinformation in the proper places. Other than that, you could copythe field values from your Delphi program into a string, like so:

Then copy the string to the clipboard. You can execute WordPerfect withShellExecute. Check the WordPerfect documentation for command line arguments(loading files, etc.). Anyway, from your template, execute a macro thatwill copy the clipboard contents to a local variable. Then, parse thestring and get the field values to insert into your WP fields.

As far as the second problem is concerned, again you’ll use the clipboard.However, this time, copy the file name of the file you saved to theclipbboard, then close WP. Once it’s closed, you can grab the value inDelphi and put it in the appropriate field in your database.

Granted, this is pretty conceptual, but it should get you pointed in theright direction.

Share the Post:
XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes

ransomware cyber attack

Why Is Ransomware Such a Major Threat?

One of the most significant cyber threats faced by modern organizations is a ransomware attack. Ransomware attacks have grown in both sophistication and frequency over the past few years, forcing

data dictionary

Tools You Need to Make a Data Dictionary

Data dictionaries are crucial for organizations of all sizes that deal with large amounts of data. they are centralized repositories of all the data in organizations, including metadata such as