Board index » delphi » Printing from Word 2k

Printing from Word 2k

I'm working with OLE for the first time in D4, and basically just trying to
do save-as to alternate file formats and print to various print drivers.
I've got a document open and can select a printer, but the call to
Application.PrintOut(...) gives me a stupid "type mismatch" error.  One
book I read says that you can get the parameters needed for OLE calls by
going into Office and recording a macro, then using the macro as your
guide.

I don't know diddly about VB, but it appears that you can use parameter
names with arguments -- ie., the arguments are NOT necessarily positional.
The parameter names supplied in the macros do not always match up with the
ones in the same functions (eg., PrintOut(...)) that Delphi's "Import Type
Lib" function lays out.  None of the D4 books I have that discuss OLE
programming say anything about this.  Some of the imported TLB file's
functions contain parameters that the macro doesn't use, and it's even hard
to tell what sort of parameter they are (eg., integer, boolean, or string),
or if they're even optional or not.

Any suggestions on how to deal with these issues?

Thanks
-David Schwartz

 

Re:Printing from Word 2k


Cancel this -- I figured it out.

Other Threads