Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.computer > #11553

Re: Excel print object?

From Paul <nospam@needed.invalid>
Newsgroups alt.computer, microsoft.public.excel, microsoft.public.excel.newusers, microsoft.public.excel.printing, microsoft.public.excel.programming
Subject Re: Excel print object?
Date 2020-02-07 04:36 -0500
Organization A noiseless patient Spider
Message-ID <r1jb2e$ane$1@dont-email.me> (permalink)
References <6P8%F.34160$Ys3.25611@fx21.iad>

Cross-posted to 5 groups.

Show all headers | View raw


Robert Baer wrote:
>   Snippet of incomplete program:
> *COPY*
>     ActivePrinter = "Acrobat PDFWriter on FILE:": PrintToFile = True
> 'note need KILL statement for PDFWriter
> ' Above sets printer in Excel 2003; WILL crash in Excel 2010.
> 
>  num = 1    'here we try to select the diagram only; hope printer will 
> use that
>  For Each iobj In ActiveSheet.Shapes    'DrawingObjects
>   iobj.Select
>   If num = 5 Then
>    Exit For   'got inserted "Picture 3"; want to print only this
>   End If
>   num = num + 1
>  Next iobj
>  '  So..how do we pass it on?
> 
> ' In "modern" defective Excel 2010, prints to default SO must set 
> default to what is needed
> '    ActivePrinter = "Xerox Phaser 6120 PS on FILE:": PrintToFile = True
>     ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=False, _
>     Collate:=False, PrToFilename:=pPath + vNam  'use + ".PS" for Xerox 
> printer
>     Kill pPath + vNam   'not needed for PS printer
> *END COPY*
> 
>   So..how do we pass it on or select it or whatever for printing?
> 
>    Thanks

Did you go looking for example code ?

https://stackoverflow.com/questions/43259793/select-entire-sheets-for-printing-excel-vba

They present an overview of sorts about .select here.

Note that the HTML formatting applied here, may require you
to test multiple browsers to get a copy clean enough to read.
Seamonkey = screwy, Chromealike = OK.

https://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba?rq=1

    Paul

Back to alt.computer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-07 00:01 -0800
  Re: Excel print object? Paul <nospam@needed.invalid> - 2020-02-07 04:36 -0500
    Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-07 11:57 -0800
      Re: Excel print object? GS <gs@v.invalid> - 2020-02-08 11:20 -0500
        Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-08 22:27 -0800
          Re: Excel print object? GS <gs@v.invalid> - 2020-02-09 10:52 -0500
            Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-09 14:30 -0800
              Re: Excel print object? Paul <nospam@needed.invalid> - 2020-02-09 19:05 -0500
                Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-10 23:26 -0800
              Re: Excel print object? GS <gs@v.invalid> - 2020-02-10 00:13 -0500
                Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-10 23:29 -0800
                Re: Excel print object? GS <gs@v.invalid> - 2020-02-12 17:27 -0500
                Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-13 22:49 -0800
                Re: Excel print object? GS <gs@v.invalid> - 2020-02-14 12:43 -0500
                Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-14 22:59 -0800
                Re: Excel print object? GS <gs@v.invalid> - 2020-02-15 05:21 -0500
                Re: Excel print object? Paul <nospam@needed.invalid> - 2020-02-15 11:08 -0500
                Re: Excel print object? GS <gs@v.invalid> - 2020-02-15 11:51 -0500
                Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-15 09:21 -0800
                Re: Excel print object? GS <gs@v.invalid> - 2020-02-15 14:31 -0500
                Re: Excel print object? Claus Busch <claus_busch@t-online.de> - 2020-02-15 21:19 +0100
                Re: Excel print object? GS <gs@v.invalid> - 2020-02-15 15:32 -0500
                Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-15 20:23 -0800
                Re: Excel print object? Paul <nospam@needed.invalid> - 2020-02-16 00:27 -0500
                Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-19 20:19 -0800
                Re: Excel print object? Paul <nospam@needed.invalid> - 2020-02-20 00:44 -0500
                Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-20 23:39 -0800
                Re: Excel print object? GS <gs@v.invalid> - 2020-02-16 02:05 -0500
                Re: Excel print object? Zaidy036 <Zaidy036@isp.invalid> - 2020-02-15 11:15 -0500
                Re: Excel print object? Robert Baer <robertbaer@localnet.com> - 2020-02-15 09:15 -0800
                Re: Excel print object? Zaidy036 <Zaidy036@isp.invalid> - 2020-02-15 14:51 -0500

csiph-web