Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print word documents to file with automation
Message
 
 
To
20/08/2009 21:31:41
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01419432
Message ID:
01419443
Views:
47
Interesting. If you believe the documentation, that shouldn't work--but then, everything I've tried DOESN'T work! After slogging through all 19 parameters, what I came up with is below. The 9th parameter is PrintToFile (boolean) and it seemed logical that everything up to that point should be required if printing to file was going to work. But then logic wouldn't put the OutputFileName 5 positions before PrintToFile!
   .ActiveDocument.Printout(.f.,.f.,0,cFileName,,,0,1,.t.,.t.,cDocName,,,,,,,)
I'll experiment with your syntax and see what happens.

The process that concatenates the files to send them to the printer is simply a FileToString, StringToFile conversion. It should be interesting combining VFP and Word output in a single string--but theoretically, printers do it every day :-)

Update: Your suggested syntax works perfectly--I truncated the parameters after the output filename. And there is no problem combining VFP and Word output into a single string to send to the printer! It works just like it always has. Thanks for rescuing me once again!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform