MS Word Bookmarks and Printing

E

electrixnow

I wrote a program in VC++ that generates a text file report. I would
like to get this report data into a word document that my company uses.
I could use bookmarks for reference in the document. Is there some
boiler plate code for C++ or VC++ that I could use to edit and add my
data to the bookmark locations in the MS Word doc file?

After I have updated the MS Word file I need to print it to a network
printer. Is there a easy way of printing this file?

My program is a win32 console application for automation. When it edits
and prints the MS Word documents it has to be done without displaying
the GUI for MS Word.

I am new to all of this windows stuff, any suggestions?

PS. Do you also know a way to email the MS Word document with SMTP?. I
have found a few SMTP add on's but I don't know if this is the best way
and have not installed yet.

Thanks in advance,
Grant
 
T

TB

electrixnow sade:
I wrote a program in VC++ that generates a text file report. I would
like to get this report data into a word document that my company uses.
I could use bookmarks for reference in the document. Is there some
boiler plate code for C++ or VC++ that I could use to edit and add my
data to the bookmark locations in the MS Word doc file?

After I have updated the MS Word file I need to print it to a network
printer. Is there a easy way of printing this file?

My program is a win32 console application for automation. When it edits
and prints the MS Word documents it has to be done without displaying
the GUI for MS Word.

I am new to all of this windows stuff, any suggestions?

PS. Do you also know a way to email the MS Word document with SMTP?. I
have found a few SMTP add on's but I don't know if this is the best way
and have not installed yet.

Thanks in advance,
Grant

This can easily be achieved with COM. Very uncomplete code:
(Automation is provided by many microsoft products)

#include "Word_TLB.h"

{
Word_tlb::TCOM_Application word;
word = Word_tlb::CoApplication_::Create();
word->Documents->Open(...);
// do stuff
word->ActiveDocument->Print(...);
word->ActiveDocument->SendMail(...);
}

But you should ask in a VC++/COM newsgroup over at microsoft,
ie the microsoft.public.* branch. It's beyond Standard C++.
 

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

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top