Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can VFP app have its own copy of Word?
Message
 
 
To
16/02/2012 11:22:24
Mike Yearwood
Toronto, Ontario, Canada
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
Application:
Desktop
Miscellaneous
Thread ID:
01532736
Message ID:
01535609
Views:
49
Thanks Mike. I'll look into that, although around 11 pm last night I realized the problem is more complex than I'd thought. The app really needs its own 'default printer' for use with both VFP and Word. The problem is that there are multiple types of devices in the list returned by Aprinters() and most can't print to paper and there doesn't seem to be an easy way to tell which ones can!

Update: 5 pm: The printer list turns out to be do-able, and you were very close with 88. That is wdFilePrint; 97 is wdDialogFilePrint and it does offer the option DoNotSetAsSysDefault. If you use GetPrinter() the dialog displays but substituting the printer name allows it to run "silent".
WITH oWord.Dialogs(wdDialogFilePrintSetup)	&& wdDialogFilePrintSetup =97
    .Printer=AppDefaultPrinter			&& getprinter() shows the dialog; printer name runs 'silent'
    .DoNotSetAsSysDefault = .t.
    .execute()
ENDWITH
That's exactly what I was looking for. Thanks!
Previous
Reply
Map
View

Click here to load this message in the networking platform