How do I send a *file*(txt + graphics) to printer?
What I've done is set up Adobe's PDFWriter as my default printer so that all I can quick-create PDFs . I do this by opening the file in WordPad and using the standard File>Print and it does the rest.
What I'm trying to do with VB is find [some sort of standard API maybe?] that can accept a string variable perhaps which contains the path and name of a file. I'm hoping that this API or Function or anything can then just send that file to the default printer and let it (the printer) deal with it. I would normally use the Printer object but the files will be .doc and contain a graphical header (of varying size).
I can get this to work with a file that has only text, but if there is an image inserted into the file I get an error (62) - Input past end of file.
Can anyone shed some light on this? Is there some function or procedure that I can pass a filename to and have it pass it to the default printer? Any insight will be appreciated.
Thanks in advance
Aaron Brennan
Print ok, another prob though
I referenced Microsoft Word Object Library 9.0 but when I try to Set objWord as CreateObject("Word.Application"), I get error "ActiveX control cannot create application".
I found out how to print the doc another way though, I just ran ShellExecute with "print" as the verb.
I still need to know how to reference a Word application though, because now I am going to have a word document with a graphical header as a template, and I need to append text to the document. Is there another way to do that?
Open "..." for Append as #liFileNum doesnt work because there's already a graphical header in the template..I could always use SendKeys but that takes a long time to execute and its unreliable.
Any insight is appreciated, Thanks