MS Word Automation using Delphi

Add-in Express™ Support Service
That's what is more important than anything else

MS Word Automation using Delphi
need assist inserting informaton into form fields and lines  
David Sudduth

Posts: 1
Joined: 2012-12-13

We have a Delphi app called instruction memo. The app creates word documents containing customer information and statements informing customers of the tasks needed to complete their transactions.

The customer info is written to fields in a form section of the document, the statements are written to lines below the form section.

All information is entered on the app then written to the document on creation using MS Word com objects.

This is my first attempt using add-ins.

I need some guidance please on the best place to begin implementing an add-in that would help with transferring information from the app to the document.

Posted 13 Dec, 2012 10:27:48 Top
Andrei Smolin

Add-in Express team

Posts: 15477
Joined: 2006-05-11

I suggest that you start with creating a Word add-in as described in the manual, {Add-in Express}\Docs\adxvcl.pdf on your PC. Please check the section Your First Microsoft Office COM Add-in.

To find out what calls to the Word object model you need, I recommend to record a macro while creating/modifying a Word document. The macro will show you Word classes/methods/properties which you need to use; you'll need to covert the macro from VBA to Delphi.

Then you'll need to make these calls in corresponding events of the TadxWordAppEvents component or in the Click event of a Ribbon/Commandbar button.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 14 Dec, 2012 06:33:11 Top