VC++, MS-Word, and Automation

N

nfg

I have a program that collects data in VC++ 6.0. I want to be able to create
MS Word
reports from that data. I need to insert more than one table with different
amount of colums and rows, insert text between the tables, add headers and
footers, change fonts and fontsize,
etc.

Does anyone know where to get documentation and/or examples of using MS Word
from a VC++ Application? So that I can accomplish the task described above?
Any pointers
to on-line information (including proper newsgroups) will be appreciated.

TIA,

Nikolas
 
R

rajas

The MSDN documentation for MsiQueryProductState says that it is only
available for Win 2K, XP and Me. I need to be able to support Win98 and
occasionally even a Win95. How can I check if they have Windows Installer
available?
 
T

Tim

LoadLibrary and GetProcAddress.
There is the other pitfall: that MS Office used MSI installers from about
Office 2000 onwards.

I'll post some code for this later...

It will work under WIndows 95 - so long as MSI has been used and an MSI
based MS Office is used. However as always with a now unsupported product
you need to remind your customers that your support for Win95 will be 'best
effort' etc.

Another options.

During product installation or first time your product is run initialise MS
Word as a COM Server and record in the registry that the product is there or
not. This combined with the first method should be a better solution but
obvisouly does not guard against product de-installation.

- Tim
 
R

rajas

Thanks Tim for continuing to look into this. Currently my approach is to do
what you suggested - first time my application is run, I actuall invoke Word
(without adding document), and depending on the success write to the
registry. My application is one that is left in the background and I do
not need to check this till the computer is shut down and started again. I
was trying to find out if there is a simpler way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top