Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01051415
Message ID:
01051420
Views:
18
>>I would like to simulated on my computer printing to a network printer defined with name like \\myserver\printername (of course, using the syntax: set printer to name (pcPrinterName)). My local printer name is "HP DeskJet 712C".
>>
>>How can I make it work with something like the \\mypc\HP DeskJet 712c? What would be [\\mypc] on my pc? Would it be PC name in the properties?
>>
>>Thank you in advance for any help.
>
>You can use SYS(0) (You need to parse the left of the #, like Left(Sys(0), At('#', Sys(0)) - 2)) or you can use Getenv("COMPUTERNAME") (at least in WIN XP), so your string would be [\\] + Getenv("COMPUTERNAME") + [\] + lcLocalPrinterName

Hogo,

Thank you very much. Yes, I just tried it and so far, no error.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View