Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print through MS word viewer

Status
Not open for further replies.

tweetie777

Programmer
Nov 22, 2001
14
0
0
ZA
I am currently using the code below in order to print a word document using my delphi program. What class string would I have to use in place of 'word.basic' in order to open and print through the word viewer. I can't find it anywhere. Thank you to anyone who can help me.

uses ComObj;

var
MSWord : OLEVariant;
begin
MSWord := CreateOLEObject('Word.Basic');
MSWord.FileOpen('c:\sample.doc');
MSWord.Print;
end;
 
Howdy,

Me again.. If you want to bring up MS Word, then insert the line 'MSWord.AppShow;' before or after the FileOpen command.
Like I said in my previous post, check the MSDN for more information on MS Office objects.

WB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top