ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print a range to a XPS document? (https://www.excelbanter.com/excel-programming/449872-print-range-xps-document.html)

Charlotte E.[_3_]

Print a range to a XPS document?
 
Hi guys,

Do any of you have a example code for printing a range to a XPS document?

I'm struggling with it, but can't make it work...
....well, it (kind of) works, but I'm not pleased with the (workaroud) way
I'm using, and was wondering if someone know of a cool/proper way of doing
it?

Thanks,

CE



---
Denne e-mail er fri for virus og malware fordi avast! Antivirus beskyttelse er aktiveret.
http://www.avast.com


GS[_2_]

Print a range to a XPS document?
 
Can we see your code?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion



GS[_2_]

Print a range to a XPS document?
 
Perhaps you'll find something useful here...

http://www.rondebruin.nl/win/s5/pdf.htm

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion



Charlotte E.[_3_]

Print a range to a XPS document?
 

Can we see your code?


It's really no big deal:

- I save the current ActivePrinter and PrintArea in two temporary variables.
- Change the ActivePrinter to the Microsoft XPS printer
- Change the PrintArea to the range I want to print.
- Do the Worksheet.PrintOut
- Reset the ActivePrinter and original PrintArea back from the temporary
variables.

Simple as that, but I still don't like relaying on an external printer, and
was wondering, if there was some sort of 'Export to XPS' as there are with
..PDF?


CE




---
Denne e-mail er fri for virus og malware fordi avast! Antivirus beskyttelse er aktiveret.
http://www.avast.com


Charlotte E.[_3_]

Print a range to a XPS document?
 
Thanks, Garry, but that applys to PDF, and I prefer XPS :-)

CE


"GS" wrote in message ...
Perhaps you'll find something useful here...

http://www.rondebruin.nl/win/s5/pdf.htm

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion





---
Denne e-mail er fri for virus og malware fordi avast! Antivirus beskyttelse er aktiveret.
http://www.avast.com


GS[_2_]

Print a range to a XPS document?
 
Thanks, Garry, but that applys to PDF, and I prefer XPS :-)

You can specify XPS in place of PDF for the output type as since Excel
12 both formats are available.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




All times are GMT +1. The time now is 04:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com