Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

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
  #2   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel print object?

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/...ting-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/...excel-vba?rq=1

Paul
  #3   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

Paul wrote:
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/...ting-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/...excel-vba?rq=1


Â*Â* Paul

Well, i looked at those and others.
Everybody refers to ranges or cells or sheets or ...
BUT not at an actual object.
Using fake code, iobj.5 is also known as "Picture 3", which was
inserted from an external source.
The For Each iobj loop was the only way i discovered how to get at it.
I want to print it after i made changes by moving other objects into
and out of it.

Thanks
  #4   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Excel print object?

Well, i looked at those and others.
Everybody refers to ranges or cells or sheets or ...
BUT not at an actual object.
Using fake code, iobj.5 is also known as "Picture 3", which was inserted
from an external source.
The For Each iobj loop was the only way i discovered how to get at it.
I want to print it after i made changes by moving other objects into and
out of it.


When I modify/markup an image in Excel I take a ScreenCapture of it and convert
that to whatever image format I'm after. Since this is the only contents on a
worksheet, the normal Print processes work as expected for printing the
finished result.

Normally, I set the sheet up like graph paper and turn Gridlines off.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #5   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

GS wrote:
* Well, i looked at those and others.
** Everybody refers to ranges or cells or sheets or ...
** BUT not at an actual object.
** Using fake code, iobj.5 is also known as "Picture 3", which was
inserted from an external source.
** The For Each iobj loop was the only way i discovered how to get at it.
** I want to print it after i made changes by moving other objects
into and out of it.


When I modify/markup an image in Excel I take a ScreenCapture of it and
convert that to whatever image format I'm after. Since this is the only
contents on a worksheet, the normal Print processes work as expected for
printing the finished result.

Normally, I set the sheet up like graph paper and turn Gridlines off.

I have a loop around the basic generator to produce 200 patterns that
i want to save, and using a PDF printer to FILE: allows the computer to
do all of the work (like it should do).

Even for one pass, I cannot get it to print that object; so the
normal Print processes does NOT work properly; it prints the whole page.

Your last line indicates that you refer to sheets (like i said), not
an object/picture.

The For Each iobj loop selects the desired object(picture); how do i
complete the process to print it?

Thanks.





  #6   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Excel print object?

GS wrote:
* Well, i looked at those and others.
** Everybody refers to ranges or cells or sheets or ...
** BUT not at an actual object.
** Using fake code, iobj.5 is also known as "Picture 3", which was
inserted from an external source.
** The For Each iobj loop was the only way i discovered how to get at it.
** I want to print it after i made changes by moving other objects into
and out of it.


When I modify/markup an image in Excel I take a ScreenCapture of it and
convert that to whatever image format I'm after. Since this is the only
contents on a worksheet, the normal Print processes work as expected for
printing the finished result.

Normally, I set the sheet up like graph paper and turn Gridlines off.

I have a loop around the basic generator to produce 200 patterns that i
want to save, and using a PDF printer to FILE: allows the computer to do all
of the work (like it should do).

Even for one pass, I cannot get it to print that object; so the normal
Print processes does NOT work properly; it prints the whole page.

Your last line indicates that you refer to sheets (like i said), not an
object/picture.

The For Each iobj loop selects the desired object(picture); how do i
complete the process to print it?

Thanks.


I ScreenCapture, as I said, then convert to the image format I want. There is
only 1 image per page, so if you want individual printouts then Insert
PageBreak after each image.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #7   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

GS wrote:
GS wrote:
* Well, i looked at those and others.
** Everybody refers to ranges or cells or sheets or ...
** BUT not at an actual object.
** Using fake code, iobj.5 is also known as "Picture 3", which was
inserted from an external source.
** The For Each iobj loop was the only way i discovered how to get
at it.
** I want to print it after i made changes by moving other objects
into and out of it.

When I modify/markup an image in Excel I take a ScreenCapture of it
and convert that to whatever image format I'm after. Since this is
the only contents on a worksheet, the normal Print processes work as
expected for printing the finished result.

Normally, I set the sheet up like graph paper and turn Gridlines off.

** I have a loop around the basic generator to produce 200 patterns
that i want to save, and using a PDF printer to FILE: allows the
computer to do all of the work (like it should do).

** Even for one pass, I cannot get it to print that object; so the
normal Print processes does NOT work properly; it prints the whole page.

** Your last line indicates that you refer to sheets (like i said),
not an object/picture.

** The For Each iobj loop selects the desired object(picture); how do
i complete the process to print it?

** Thanks.


I ScreenCapture, as I said, then convert to the image format I want.
There is only 1 image per page, so if you want individual printouts then
Insert PageBreak after each image.

Computers are supposed to be able to automate repetitive
(programming) tasks.
I create 200 different "Picture 3" (fifth iobj) and need to print
each one.
But i cannot print even one without code to do that.
For me to screen capture each one is manifestly stupid for me.

Do you have any clue as to what excel code to use for printing that
object?

Thanks.



  #8   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Excel print object?

Computers are supposed to be able to automate repetitive (programming) tasks.
I create 200 different "Picture 3" (fifth iobj) and need to print each
one.
But i cannot print even one without code to do that.
For me to screen capture each one is manifestly stupid for me.

Do you have any clue as to what excel code to use for printing that
object?


What I do with ScreenCapture has nothing to do with what you want to do
print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE as I suggested and use
normal print process, individual pages will be printed ONE IMAGE PER PAGE!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Excel print object?

Hi Robert,

Am Fri, 7 Feb 2020 00:01:05 -0800 schrieb Robert Baer:

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.


only workbook, worksheets, sheet ranges and charts can be exported to
PDF.

Try:

Sub PrintShapes()
Dim shp As Shape
Dim i As Integer
Dim varShp() As Variant

'Modify here the path to save the pdf
Const myPath = "C:\Users\claus\Desktop\"
With Application
.ScreenUpdating = False
.DisplayAlerts = False
End With
'Modify the sheet name
With Sheets("Sheet1")
For Each shp In .Shapes
ReDim Preserve varShp(i)
varShp(i) = shp.Name
i = i + 1
Next

Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = "Temp"

For i = LBound(varShp) To UBound(varShp)
With Charts.Add
.SetSourceData Source:=Sheets("Temp").Range("A1")
.Location whe=xlLocationAsObject, Name:=Sheets("Temp").Name
End With
.Shapes(varShp(i)).Copy
Sheets("Temp").ChartObjects(1).Chart.Paste
With Sheets("Temp").Shapes(1)
.Height = Sheets("Sheet1").Shapes(varShp(i)).Height + 1
.Width = Sheets("Sheet1").Shapes(varShp(i)).Width + 1
End With

Sheets("Temp").ChartObjects(1).Chart.ExportAsFixed Format Type:=xlTypePDF, Filename:= _
myPath & varShp(i) & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Sheets("Temp").ChartObjects(1).Delete
Next
Sheets("Temp").Delete
End With
With Application
.ScreenUpdating = True
.DisplayAlerts = True
End With
End Sub


Regards
Claus B.
--
Windows10
Office 2016
  #10   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

GS wrote:
Computers are supposed to be able to automate repetitive (programming)
tasks.
** I create 200 different "Picture 3" (fifth iobj) and need to print
each one.
** But i cannot print even one without code to do that.
** For me to screen capture each one is manifestly stupid for me.

** Do you have any clue as to what excel code to use for printing that
object?


What I do with ScreenCapture has nothing to do with what you want to do
print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE as I suggested and
use normal print process, individual pages will be printed ONE IMAGE PER
PAGE!

One has to GET the image first. At present i have no way to transfer
the fifth iobj as an image to anything, so it is moot.



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

Claus Busch wrote:
Hi Robert,

Am Fri, 7 Feb 2020 00:01:05 -0800 schrieb Robert Baer:

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.


only workbook, worksheets, sheet ranges and charts can be exported to
PDF.

Try:

Sub PrintShapes()
Dim shp As Shape
Dim i As Integer
Dim varShp() As Variant

'Modify here the path to save the pdf
Const myPath = "C:\Users\claus\Desktop\"
With Application
.ScreenUpdating = False
.DisplayAlerts = False
End With
'Modify the sheet name
With Sheets("Sheet1")
For Each shp In .Shapes
ReDim Preserve varShp(i)
varShp(i) = shp.Name
i = i + 1
Next

Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = "Temp"

For i = LBound(varShp) To UBound(varShp)
With Charts.Add
.SetSourceData Source:=Sheets("Temp").Range("A1")
.Location whe=xlLocationAsObject, Name:=Sheets("Temp").Name
End With
.Shapes(varShp(i)).Copy
Sheets("Temp").ChartObjects(1).Chart.Paste
With Sheets("Temp").Shapes(1)
.Height = Sheets("Sheet1").Shapes(varShp(i)).Height + 1
.Width = Sheets("Sheet1").Shapes(varShp(i)).Width + 1
End With

Sheets("Temp").ChartObjects(1).Chart.ExportAsFixed Format Type:=xlTypePDF, Filename:= _
myPath & varShp(i) & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Sheets("Temp").ChartObjects(1).Delete
Next
Sheets("Temp").Delete
End With
With Application
.ScreenUpdating = True
.DisplayAlerts = True
End With
End Sub


Regards
Claus B.

Interesting.
(thinking out loud)..my iobj is IN a sheet..it is NOT a ChartObject
or related to a chart in any way that i know of..maybe it can be
considered as a Shape.
So, perhaps there is a chance of part of above working..

Thanks.


  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Excel print object?

Hi Robert,

Am Mon, 10 Feb 2020 23:50:09 -0800 schrieb Robert Baer:


Interesting.
(thinking out loud)..my iobj is IN a sheet..it is NOT a ChartObject
or related to a chart in any way that i know of..maybe it can be
considered as a Shape.
So, perhaps there is a chance of part of above working..


another idea:

Sub ShapesToPDF()
Dim c As Range
Dim shp As Shape
Dim varShp() As Variant
Dim i As Integer, iRow As Integer, iCol As Integer

'Modify the path for the PDFs
Const myPath = "C:\Users\claus\Desktop\"

With ActiveSheet
For Each shp In .Shapes
ReDim Preserve varShp(i)
varShp(i) = shp.Name
i = i + 1
Next

For i = LBound(varShp) To UBound(varShp)
Set c = .Shapes(varShp(i)).TopLeftCell
For iRow = 2 To 30
With .Shapes(varShp(i))
If c.Resize(iRow).Top + c.Resize(iRow).Height .Top + _
.Height Then
Exit For
End If
End With
Next
For iCol = 2 To 20
With .Shapes(varShp(i))
If c.Resize(, iCol).Left + c.Resize(, iCol).Width
..Left + _
.Width Then
Exit For
End If
End With
Next
c.Resize(iRow, iCol).ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
myPath & varShp(i) & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Next
End With
End Sub


Regards
Claus B.
--
Windows10
Office 2016
  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

Claus Busch wrote:
Hi Robert,

Am Mon, 10 Feb 2020 23:50:09 -0800 schrieb Robert Baer:


Interesting.
(thinking out loud)..my iobj is IN a sheet..it is NOT a ChartObject
or related to a chart in any way that i know of..maybe it can be
considered as a Shape.
So, perhaps there is a chance of part of above working..


another idea:

Sub ShapesToPDF()
Dim c As Range
Dim shp As Shape
Dim varShp() As Variant
Dim i As Integer, iRow As Integer, iCol As Integer

'Modify the path for the PDFs
Const myPath = "C:\Users\claus\Desktop\"

With ActiveSheet
For Each shp In .Shapes
ReDim Preserve varShp(i)
varShp(i) = shp.Name
i = i + 1
Next

For i = LBound(varShp) To UBound(varShp)
Set c = .Shapes(varShp(i)).TopLeftCell
For iRow = 2 To 30
With .Shapes(varShp(i))
If c.Resize(iRow).Top + c.Resize(iRow).Height .Top + _
.Height Then
Exit For
End If
End With
Next
For iCol = 2 To 20
With .Shapes(varShp(i))
If c.Resize(, iCol).Left + c.Resize(, iCol).Width
.Left + _
.Width Then
Exit For
End If
End With
Next
c.Resize(iRow, iCol).ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
myPath & varShp(i) & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Next
End With
End Sub


Regards
Claus B.

Thanks.
Will try your suggestions when i have the time; got too many irons
and only one fire.

  #14   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Excel print object?

GS wrote:
Computers are supposed to be able to automate repetitive (programming)
tasks.
** I create 200 different "Picture 3" (fifth iobj) and need to print each
one.
** But i cannot print even one without code to do that.
** For me to screen capture each one is manifestly stupid for me.

** Do you have any clue as to what excel code to use for printing that
object?


What I do with ScreenCapture has nothing to do with what you want to do
print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE as I suggested and use
normal print process, individual pages will be printed ONE IMAGE PER PAGE!

One has to GET the image first. At present i have no way to transfer the
fifth iobj as an image to anything, so it is moot.


Not understanding your meaning here; - if the image is already on a worksheet
then just follow its position with a PageBreak so the normal printing process
outputs 1 image per page. Isn't this what you want?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #15   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

GS wrote:
GS wrote:
Computers are supposed to be able to automate repetitive
(programming) tasks.
** I create 200 different "Picture 3" (fifth iobj) and need to print
each one.
** But i cannot print even one without code to do that.
** For me to screen capture each one is manifestly stupid for me.

** Do you have any clue as to what excel code to use for printing
that object?

What I do with ScreenCapture has nothing to do with what you want to
do print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE as I
suggested and use normal print process, individual pages will be
printed ONE IMAGE PER PAGE!

** One has to GET the image first. At present i have no way to
transfer the fifth iobj as an image to anything, so it is moot.


Not understanding your meaning here; - if the image is already on a
worksheet then just follow its position with a PageBreak so the normal
printing process outputs 1 image per page. Isn't this what you want?

What is "follow its position"?
So far, there is no "normal printing process"; i do not know what
method or process or ... to use for printing.



  #16   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Excel print object?

GS wrote:
GS wrote:
Computers are supposed to be able to automate repetitive (programming)
tasks.
** I create 200 different "Picture 3" (fifth iobj) and need to print
each one.
** But i cannot print even one without code to do that.
** For me to screen capture each one is manifestly stupid for me.

** Do you have any clue as to what excel code to use for printing that
object?

What I do with ScreenCapture has nothing to do with what you want to do
print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE as I suggested and
use normal print process, individual pages will be printed ONE IMAGE PER
PAGE!

** One has to GET the image first. At present i have no way to transfer
the fifth iobj as an image to anything, so it is moot.


Not understanding your meaning here; - if the image is already on a
worksheet then just follow its position with a PageBreak so the normal
printing process outputs 1 image per page. Isn't this what you want?

What is "follow its position"?
So far, there is no "normal printing process"; i do not know what method
or process or ... to use for printing.


Ok, assuming your image objects are on a worksheet and are oriented
top-to-bottom, the cell where the image object is inserted should also contain
a PageBreak so when you use Excel's Print process there will be one image
object per page. (You'll be able to see this in the PrintPreview pane)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #17   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

GS wrote:
GS wrote:
GS wrote:
Computers are supposed to be able to automate repetitive
(programming) tasks.
** I create 200 different "Picture 3" (fifth iobj) and need to
print each one.
** But i cannot print even one without code to do that.
** For me to screen capture each one is manifestly stupid for me.

** Do you have any clue as to what excel code to use for printing
that object?

What I do with ScreenCapture has nothing to do with what you want
to do print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE as I
suggested and use normal print process, individual pages will be
printed ONE IMAGE PER PAGE!

** One has to GET the image first. At present i have no way to
transfer the fifth iobj as an image to anything, so it is moot.

Not understanding your meaning here; - if the image is already on a
worksheet then just follow its position with a PageBreak so the
normal printing process outputs 1 image per page. Isn't this what you
want?

** What is "follow its position"?
** So far, there is no "normal printing process"; i do not know what
method or process or ... to use for printing.


Ok, assuming your image objects are on a worksheet and are oriented
top-to-bottom, the cell where the image object is inserted should also
contain a PageBreak so when you use Excel's Print process there will be
one image object per page. (You'll be able to see this in the
PrintPreview pane)

There is only one object and it spans/covers a goodly number of
cells; it was inserted from a file, and takes space like a chart.
Therefore, a page break will have no effect - that would be behind
the image/picture.
And there is no "PrintPreview pane", never ever seen one in 7 years.

Stupid mmmmmmmm... what code is needed to print a chart?
Perhaps i could fumble that to print either the object or the
picture, since those are the same image.

Thanks.

  #18   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Excel print object?

GS wrote:
GS wrote:
GS wrote:
Computers are supposed to be able to automate repetitive (programming)
tasks.
** I create 200 different "Picture 3" (fifth iobj) and need to print
each one.
** But i cannot print even one without code to do that.
** For me to screen capture each one is manifestly stupid for me.

** Do you have any clue as to what excel code to use for printing that
object?

What I do with ScreenCapture has nothing to do with what you want to do
print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE as I suggested and
use normal print process, individual pages will be printed ONE IMAGE
PER PAGE!

** One has to GET the image first. At present i have no way to transfer
the fifth iobj as an image to anything, so it is moot.

Not understanding your meaning here; - if the image is already on a
worksheet then just follow its position with a PageBreak so the normal
printing process outputs 1 image per page. Isn't this what you want?

** What is "follow its position"?
** So far, there is no "normal printing process"; i do not know what
method or process or ... to use for printing.


Ok, assuming your image objects are on a worksheet and are oriented
top-to-bottom, the cell where the image object is inserted should also
contain a PageBreak so when you use Excel's Print process there will be one
image object per page. (You'll be able to see this in the PrintPreview
pane)

There is only one object and it spans/covers a goodly number of cells; it
was inserted from a file, and takes space like a chart.
Therefore, a page break will have no effect - that would be behind the
image/picture.
And there is no "PrintPreview pane", never ever seen one in 7 years.


Uh.., I've been using Excel since v4.0 and there has always been a PrintPreview
window (File Print Preview) until v2007 when PrintPreview was included on the
Print tab of BackOffice, and now the File Print tab in v2010 and later.

Stupid mmmmmmmm... what code is needed to print a chart?
Perhaps i could fumble that to print either the object or the picture,
since those are the same image.

Thanks.


You can't print objects themselves, just the portion of the sheet the objects
are on.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #19   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel print object?

Robert Baer wrote:
GS wrote:
GS wrote:
GS wrote:
Computers are supposed to be able to automate repetitive
(programming) tasks.
I create 200 different "Picture 3" (fifth iobj) and need to
print each one.
But i cannot print even one without code to do that.
For me to screen capture each one is manifestly stupid for me.

Do you have any clue as to what excel code to use for printing
that object?

What I do with ScreenCapture has nothing to do with what you want
to do print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE as I
suggested and use normal print process, individual pages will be
printed ONE IMAGE PER PAGE!

One has to GET the image first. At present i have no way to
transfer the fifth iobj as an image to anything, so it is moot.

Not understanding your meaning here; - if the image is already on a
worksheet then just follow its position with a PageBreak so the
normal printing process outputs 1 image per page. Isn't this what
you want?

What is "follow its position"?
So far, there is no "normal printing process"; i do not know what
method or process or ... to use for printing.


Ok, assuming your image objects are on a worksheet and are oriented
top-to-bottom, the cell where the image object is inserted should also
contain a PageBreak so when you use Excel's Print process there will
be one image object per page. (You'll be able to see this in the
PrintPreview pane)

There is only one object and it spans/covers a goodly number of
cells; it was inserted from a file, and takes space like a chart.
Therefore, a page break will have no effect - that would be behind the
image/picture.
And there is no "PrintPreview pane", never ever seen one in 7 years.

Stupid mmmmmmmm... what code is needed to print a chart?
Perhaps i could fumble that to print either the object or the picture,
since those are the same image.

Thanks.


Can you copy the items in question, into another Office tool like
MSWD and via OLE (object linking and embedding), print them when
in a Word document ? I can't believe printing the items by
themselves is useful. You probably want those objects plus
some descriptive text, for a re-purposing project.

Another way to do it, would be to print the whole thing to
PDF, and use LibreOffice Draw to read in the PDF, then
edit it as graphics and delete the stuff not wanted in
the picture. (Office 2003 likely doesn't read PDF,
while LO today can a bit.) Again, a poor way to do it,
not likely to look the way you wanted. Modern Office can
read in PDF.

And as for the topic of screen shots, the largest screenshot
I can do here, is 16384x16384 (in Linux). It's possible to
do that by editing Xorg.conf. It's not all that stable and
useful. You have to change the background of the screen and
"write stuff on it", to tell you where you are. Navigation
at 16384x16384 is almost impossible. Windows had
that capability too, up to a point. I found a claim
recently that the mode is now no longer possible/allowed
in Windows 10. The last OS "that isn't in chains" is
Windows 7. Windows 10 has had capabilities nibbled off
the edges, making it less useful for hero experiments
('cause everyone really wants a SmartPhone, right?).
Windows 7 is the last OS where FRAPS will run (an all purpose
screen capture utility).

Paul
  #20   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel print object?

On 2/15/2020 1:59 AM, Robert Baer wrote:
GS wrote:
GS wrote:
GS wrote:
Computers are supposed to be able to automate repetitive
(programming) tasks.
** I create 200 different "Picture 3" (fifth iobj) and need to
print each one.
** But i cannot print even one without code to do that.
** For me to screen capture each one is manifestly stupid for me.

** Do you have any clue as to what excel code to use for printing
that object?

What I do with ScreenCapture has nothing to do with what you want
to do print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE as I
suggested and use normal print process, individual pages will be
printed ONE IMAGE PER PAGE!

** One has to GET the image first. At present i have no way to
transfer the fifth iobj as an image to anything, so it is moot.

Not understanding your meaning here; - if the image is already on a
worksheet then just follow its position with a PageBreak so the
normal printing process outputs 1 image per page. Isn't this what
you want?

** What is "follow its position"?
** So far, there is no "normal printing process"; i do not know what
method or process or ... to use for printing.


Ok, assuming your image objects are on a worksheet and are oriented
top-to-bottom, the cell where the image object is inserted should also
contain a PageBreak so when you use Excel's Print process there will
be one image object per page. (You'll be able to see this in the
PrintPreview pane)

** There is only one object and it spans/covers a goodly number of
cells; it was inserted from* a file, and takes space like a chart.
* Therefore, a page break will have no effect - that would be behind
the image/picture.
* And there is no "PrintPreview pane", never ever seen one in 7 years.

* Stupid mmmmmmmm... what code is needed to print a chart?
* Perhaps i could fumble that to print either the object or the
picture, since those are the same image.

** Thanks.

"Page Layout" "Page Setup" then small square with down/right arrow and
you will find PrintPreview

--
Zaidy036


  #21   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Excel print object?

Robert Baer wrote:
GS wrote:
GS wrote:
GS wrote:
Computers are supposed to be able to automate repetitive
(programming) tasks.
I create 200 different "Picture 3" (fifth iobj) and need to print
each one.
But i cannot print even one without code to do that.
For me to screen capture each one is manifestly stupid for me.

Do you have any clue as to what excel code to use for printing
that object?

What I do with ScreenCapture has nothing to do with what you want to
do print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE as I suggested
and use normal print process, individual pages will be printed ONE
IMAGE PER PAGE!

One has to GET the image first. At present i have no way to transfer
the fifth iobj as an image to anything, so it is moot.

Not understanding your meaning here; - if the image is already on a
worksheet then just follow its position with a PageBreak so the normal
printing process outputs 1 image per page. Isn't this what you want?

What is "follow its position"?
So far, there is no "normal printing process"; i do not know what
method or process or ... to use for printing.

Ok, assuming your image objects are on a worksheet and are oriented
top-to-bottom, the cell where the image object is inserted should also
contain a PageBreak so when you use Excel's Print process there will be
one image object per page. (You'll be able to see this in the PrintPreview
pane)

There is only one object and it spans/covers a goodly number of cells;
it was inserted from a file, and takes space like a chart.
Therefore, a page break will have no effect - that would be behind the
image/picture.
And there is no "PrintPreview pane", never ever seen one in 7 years.

Stupid mmmmmmmm... what code is needed to print a chart?
Perhaps i could fumble that to print either the object or the picture,
since those are the same image.

Thanks.


Can you copy the items in question, into another Office tool like
MSWD and via OLE (object linking and embedding), print them when
in a Word document ? I can't believe printing the items by
themselves is useful. You probably want those objects plus
some descriptive text, for a re-purposing project.

Another way to do it, would be to print the whole thing to
PDF, and use LibreOffice Draw to read in the PDF, then
edit it as graphics and delete the stuff not wanted in
the picture. (Office 2003 likely doesn't read PDF,
while LO today can a bit.) Again, a poor way to do it,
not likely to look the way you wanted. Modern Office can
read in PDF.

And as for the topic of screen shots, the largest screenshot
I can do here, is 16384x16384 (in Linux). It's possible to
do that by editing Xorg.conf. It's not all that stable and
useful. You have to change the background of the screen and
"write stuff on it", to tell you where you are. Navigation
at 16384x16384 is almost impossible. Windows had
that capability too, up to a point. I found a claim
recently that the mode is now no longer possible/allowed
in Windows 10. The last OS "that isn't in chains" is
Windows 7. Windows 10 has had capabilities nibbled off
the edges, making it less useful for hero experiments
('cause everyone really wants a SmartPhone, right?).
Windows 7 is the last OS where FRAPS will run (an all purpose
screen capture utility).

Paul


If he puts PageBreaks in the appropriate places so the normal Print process
outputs 1 object per page it will do as he desires! Not sure why noone is
getting this; - perhap's it's just too simple?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #22   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

Zaidy036 wrote:
On 2/15/2020 1:59 AM, Robert Baer wrote:
GS wrote:
GS wrote:
GS wrote:
Computers are supposed to be able to automate repetitive
(programming) tasks.
** I create 200 different "Picture 3" (fifth iobj) and need to
print each one.
** But i cannot print even one without code to do that.
** For me to screen capture each one is manifestly stupid for me.

** Do you have any clue as to what excel code to use for
printing that object?

What I do with ScreenCapture has nothing to do with what you want
to do print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE as I
suggested and use normal print process, individual pages will be
printed ONE IMAGE PER PAGE!

** One has to GET the image first. At present i have no way to
transfer the fifth iobj as an image to anything, so it is moot.

Not understanding your meaning here; - if the image is already on a
worksheet then just follow its position with a PageBreak so the
normal printing process outputs 1 image per page. Isn't this what
you want?

** What is "follow its position"?
** So far, there is no "normal printing process"; i do not know what
method or process or ... to use for printing.

Ok, assuming your image objects are on a worksheet and are oriented
top-to-bottom, the cell where the image object is inserted should
also contain a PageBreak so when you use Excel's Print process there
will be one image object per page. (You'll be able to see this in the
PrintPreview pane)

*** There is only one object and it spans/covers a goodly number of
cells; it was inserted from* a file, and takes space like a chart.
** Therefore, a page break will have no effect - that would be behind
the image/picture.
** And there is no "PrintPreview pane", never ever seen one in 7 years.

** Stupid mmmmmmmm... what code is needed to print a chart?
** Perhaps i could fumble that to print either the object or the
picture, since those are the same image.

*** Thanks.

"Page Layout" "Page Setup" then small square with down/right arrow and
you will find PrintPreview

Again, what code is needed to print a chart?
  #23   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

GS wrote:
Robert Baer wrote:
GS wrote:
GS wrote:
GS wrote:
Computers are supposed to be able to automate repetitive
(programming) tasks.
** I create 200 different "Picture 3" (fifth iobj) and need to
print each one.
** But i cannot print even one without code to do that.
** For me to screen capture each one is manifestly stupid for me.

** Do you have any clue as to what excel code to use for
printing that object?

What I do with ScreenCapture has nothing to do with what you
want to do print-wise. IF YOU PUT A PAGE BREAK AFTER EACH IMAGE
as I suggested and use normal print process, individual pages
will be printed ONE IMAGE PER PAGE!

** One has to GET the image first. At present i have no way to
transfer the fifth iobj as an image to anything, so it is moot.

Not understanding your meaning here; - if the image is already on
a worksheet then just follow its position with a PageBreak so the
normal printing process outputs 1 image per page. Isn't this what
you want?

** What is "follow its position"?
** So far, there is no "normal printing process"; i do not know
what method or process or ... to use for printing.

Ok, assuming your image objects are on a worksheet and are oriented
top-to-bottom, the cell where the image object is inserted should
also contain a PageBreak so when you use Excel's Print process there
will be one image object per page. (You'll be able to see this in
the PrintPreview pane)

** There is only one object and it spans/covers a goodly number of
cells; it was inserted from* a file, and takes space like a chart.
* Therefore, a page break will have no effect - that would be behind
the image/picture.
* And there is no "PrintPreview pane", never ever seen one in 7 years.

* Stupid mmmmmmmm... what code is needed to print a chart?
* Perhaps i could fumble that to print either the object or the
picture, since those are the same image.

** Thanks.


** So,you can automate (write program) to do all of the folowing 200 times?
Can you copy the items in question, into another Office tool like
MSWD and via OLE (object linking and embedding), print them when
in a Word document ? I can't believe printing the items by
themselves is useful. You probably want those objects plus
some descriptive text, for a re-purposing project.

Another way to do it, would be to print the whole thing to
PDF, and use LibreOffice Draw to read in the PDF, then
edit it as graphics and delete the stuff not wanted in
the picture. (Office 2003 likely doesn't read PDF,
while LO today can a bit.) Again, a poor way to do it,
not likely to look the way you wanted. Modern Office can
read in PDF.

And as for the topic of screen shots, the largest screenshot
I can do here, is 16384x16384 (in Linux). It's possible to
do that by editing Xorg.conf. It's not all that stable and
useful. You have to change the background of the screen and
"write stuff on it", to tell you where you are. Navigation
at 16384x16384 is almost impossible. Windows had
that capability too, up to a point. I found a claim
recently that the mode is now no longer possible/allowed
in Windows 10. The last OS "that isn't in chains" is
Windows 7. Windows 10 has had capabilities nibbled off
the edges, making it less useful for hero experiments
('cause everyone really wants a SmartPhone, right?).
Windows 7 is the last OS where FRAPS will run (an all purpose
screen capture utility).

*** Paul


If he puts PageBreaks in the appropriate places so the normal Print
process outputs 1 object per page it will do as he desires! Not sure why
noone is getting this; - perhap's it's just too simple?

* Page breaks will not show in a chart because a chart is "in front" or
overlays cells.
Furthermore, a chart can take a rather large number of cells (C6..Q38).

Again, what code is needed to print a chart?


  #24   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Excel print object?

* Page breaks will not show in a chart because a chart is "in front" or
overlays cells.


PageBreaks don't show at all; - they reside in the cell where they are
inserted!

Furthermore, a chart can take a rather large number of cells (C6..Q38).

Again, what code is needed to print a chart?


Again, you can't print a chart (or any other object) apart from its position on
the worksheet. *Excel only prints sheet contents in their respective location
on a sheet*

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #25   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel print object?


** And there is no "PrintPreview pane", never ever seen one in 7 years.



"Page Layout" "Page Setup" then small square with down/right arrow
and you will find PrintPreview

* Again, what code is needed to print a chart?


Nothing. Just responding to above in a previous post.
--
Zaidy036


  #26   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Excel print object?

Hi Garry,

Am Sat, 15 Feb 2020 14:31:38 -0500 schrieb GS:

Again, you can't print a chart (or any other object) apart from its position on
the worksheet. *Excel only prints sheet contents in their respective location
on a sheet*


a chart is an exception. Select the chart = File = Print.
How to embed a shape into an empty chart object and then export that
chart object to a pdf file I wrote in public.excel.programming


Regards
Claus B.
--
Windows10
Office 2016
  #27   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Excel print object?

Hi Garry,

Am Sat, 15 Feb 2020 14:31:38 -0500 schrieb GS:

Again, you can't print a chart (or any other object) apart from its position
on the worksheet. *Excel only prints sheet contents in their respective
location on a sheet*


a chart is an exception. Select the chart = File = Print.
How to embed a shape into an empty chart object and then export that
chart object to a pdf file I wrote in public.excel.programming


Regards
Claus B.


According to the Excel Object Browser, ChartObject does not have a Printout
method and so I suspect what's getting printed in your scenario is the range
the chart occupies on the sheet; - NOT the chart itself. Seems like a lot of
trouble to go to just to print a shape that will print in the normal process if
the PageSetup is done right!<g

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #28   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

GS wrote:
* Page breaks will not show in a chart because a chart is "in front"
or overlays cells.


PageBreaks don't show at all; - they reside in the cell where they are
inserted!

** Furthermore, a chart can take a rather large number of cells
(C6..Q38).

** Again, what code is needed to print a chart?


Again, you can't print a chart (or any other object) apart from its
position on the worksheet. *Excel only prints sheet contents in their
respective location on a sheet*

* Not true; easy and simple when done manually:
1) Select the chart
2) File-- Print
Done.


  #29   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel print object?

Robert Baer wrote:
GS wrote:
* Page breaks will not show in a chart because a chart is "in front"
or overlays cells.


PageBreaks don't show at all; - they reside in the cell where they are
inserted!

Furthermore, a chart can take a rather large number of cells
(C6..Q38).

Again, what code is needed to print a chart?


Again, you can't print a chart (or any other object) apart from its
position on the worksheet. *Excel only prints sheet contents in their
respective location on a sheet*

* Not true; easy and simple when done manually:
1) Select the chart
2) File-- Print
Done.


https://docs.microsoft.com/en-us/off...mbedded-charts

Paul
  #30   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Excel print object?

GS wrote:
* Page breaks will not show in a chart because a chart is "in front" or
overlays cells.


PageBreaks don't show at all; - they reside in the cell where they are
inserted!

** Furthermore, a chart can take a rather large number of cells (C6..Q38).

** Again, what code is needed to print a chart?


Again, you can't print a chart (or any other object) apart from its
position on the worksheet. *Excel only prints sheet contents in their
respective location on a sheet*

* Not true; easy and simple when done manually:
1) Select the chart
2) File-- Print
Done.


Wrong in the context you requested; - you can NOT duplicate that in VBA
otherwise you'd be able to create code via the Macro Recorder!

Using VBA, since that is the context of this thread, you must specify the range
the chart resides in to include it in a printout. Ergo, why I use PageBreak at
each insertion cell to get one object (chart,picture,shape) printed per page.
(Assumes all objects are within defined Print_Area)

--
Garry

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


  #31   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

Paul wrote:
Robert Baer wrote:
GS wrote:
* Page breaks will not show in a chart because a chart is "in front"
or overlays cells.

PageBreaks don't show at all; - they reside in the cell where they
are inserted!

** Furthermore, a chart can take a rather large number of cells
(C6..Q38).

** Again, what code is needed to print a chart?

Again, you can't print a chart (or any other object) apart from its
position on the worksheet. *Excel only prints sheet contents in their
respective location on a sheet*

* Not true; easy and simple when done manually:
* 1) Select the chart
* 2) File-- Print
* Done.


https://docs.microsoft.com/en-us/off...mbedded-charts


** Paul

No charts found; cannot work as-is.
If i change the word chart to shape i can find 16 shapes, which is
correct; it is the 4th shape, but one the activate crashes.
Then there is the problem of assigning a name to the print file.
Noodling around on that site was worse than not trying.
Tying the baby bird Goo-Gull,got nowhere.

Once upon a time, in one version of Excel,this worked:
ActivePrinter:="Acrobat PDFWriter", PrintToFile:= True, PrintToFile:=
True, _
PrintOut Copies:= 1, Preview:= False, Collate:= False, _
PrToFilename:=pPath + vNam + ".PDF"

Excel barfs.
Also, i was able to derive the above sequentially, comma to comma or
entry to entry from a pulldown in Excel - i think in edit.

No more; NO help even for ActivePrinter, were i started (i think).

Thanks.
  #32   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel print object?

Robert Baer wrote:
Paul wrote:
Robert Baer wrote:
GS wrote:
* Page breaks will not show in a chart because a chart is "in
front" or overlays cells.

PageBreaks don't show at all; - they reside in the cell where they
are inserted!

Furthermore, a chart can take a rather large number of cells
(C6..Q38).

Again, what code is needed to print a chart?

Again, you can't print a chart (or any other object) apart from its
position on the worksheet. *Excel only prints sheet contents in
their respective location on a sheet*
* Not true; easy and simple when done manually:
1) Select the chart
2) File-- Print
Done.


https://docs.microsoft.com/en-us/off...mbedded-charts


Paul

No charts found; cannot work as-is.
If i change the word chart to shape i can find 16 shapes, which is
correct; it is the 4th shape, but one the activate crashes.
Then there is the problem of assigning a name to the print file.
Noodling around on that site was worse than not trying.
Tying the baby bird Goo-Gull,got nowhere.

Once upon a time, in one version of Excel,this worked:
ActivePrinter:="Acrobat PDFWriter", PrintToFile:= True, PrintToFile:=
True, _
PrintOut Copies:= 1, Preview:= False, Collate:= False, _
PrToFilename:=pPath + vNam + ".PDF"

Excel barfs.
Also, i was able to derive the above sequentially, comma to comma or
entry to entry from a pulldown in Excel - i think in edit.

No more; NO help even for ActivePrinter, were i started (i think).

Thanks.


I tried to set myself up a trial version of Office 2003
to test, but that didn't work. Wouldn't activate.

What if you were to use the menus in Excel, to print the
entire document to PDF. So that you know all the
objects are in the document.

Then, use a PDF editor to re-arrange the content,
removing the parts you don't want.

You could try LibreOffice Draw as a PDF Editor of sorts.
Just print off one page as a test first, and experiment
with that.

Paul

  #33   Report Post  
Posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

Paul wrote:
Robert Baer wrote:
Paul wrote:
Robert Baer wrote:
GS wrote:
* Page breaks will not show in a chart because a chart is "in
front" or overlays cells.

PageBreaks don't show at all; - they reside in the cell where they
are inserted!

** Furthermore, a chart can take a rather large number of cells
(C6..Q38).

** Again, what code is needed to print a chart?

Again, you can't print a chart (or any other object) apart from its
position on the worksheet. *Excel only prints sheet contents in
their respective location on a sheet*
* Not true; easy and simple when done manually:
* 1) Select the chart
* 2) File-- Print
* Done.

https://docs.microsoft.com/en-us/off...mbedded-charts


*** Paul

* No charts found; cannot work as-is.
* If i change the word chart to shape i can find 16 shapes, which is
correct; it is the 4th shape, but one the activate crashes.
* Then there is the problem of assigning a name to the print file.
* Noodling around on that site was worse than not trying.
* Tying the baby bird Goo-Gull,got nowhere.

* Once upon a time, in one version of Excel,this worked:
ActivePrinter:="Acrobat PDFWriter", PrintToFile:= True, PrintToFile:=
True, _
PrintOut Copies:= 1, Preview:= False, Collate:= False, _
PrToFilename:=pPath + vNam + ".PDF"

* Excel barfs.
* Also, i was able to derive the above sequentially, comma to comma or
entry to entry from a pulldown in Excel - i think in edit.

* No more; NO help even for ActivePrinter, were i started (i think).

* Thanks.


I tried to set myself up a trial version of Office 2003
to test, but that didn't work. Wouldn't activate.

What if you were to use the menus in Excel, to print the
entire document to PDF. So that you know all the
objects are in the document.

Then, use a PDF editor to re-arrange the content,
removing the parts you don't want.

You could try LibreOffice Draw as a PDF Editor of sorts.
Just print off one page as a test first, and experiment
with that.

** Paul

I certainly do not want to do manual fiddling for each desired result
200 times!
Do not like the idea even for one result.

So far, the best i have squeezed out is initially set Print Area
C12..Q66, use my program to calculate and place shapes in iobj.3, STOP
program, manually file/print/name, then continue so program can then
"erase" the work to restore original inserted picture.

Good for onseies but far from ideal.
Would be VERY nice to have Excel do that manual part.....

Thanks.
  #34   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default Excel print object?

Hi Paul

Just putting it out there, and not even sure this is even relevant here for your issue, but! I ran across this when using code to print charts; coding would only print the charts and not the labels or data series. Apparently Microsoft screwed up on one of their Security Patches KB2596596: https://support.microsoft.com/en-us/...cember-13-2011
https://answers.microsoft.com/en-us/...3-5323489abae9

It would seem nobody within my company had ever used coding for specific printing, hence the reason it was never identified until now.

There was a patch to fix this issue:
http://www.microsoft.com/downloads/d...2-d778db920826

Maybe chat with your IT Dept and see if this is an active issue within your version of office.

The paranoid control freaks in my IT Dept are refusing to apply the fix for little ol' me, because it has global implications for the entire network, blah, blah, go figure!

HTH
Cheers
Mark.

  #35   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Excel print object?

Living the Dream wrote:
Hi Paul

Just putting it out there, and not even sure this is even relevant here for your issue, but! I ran across this when using code to print charts; coding would only print the charts and not the labels or data series. Apparently Microsoft screwed up on one of their Security Patches KB2596596: https://support.microsoft.com/en-us/...cember-13-2011
https://answers.microsoft.com/en-us/...3-5323489abae9

It would seem nobody within my company had ever used coding for specific printing, hence the reason it was never identified until now.

There was a patch to fix this issue:
http://www.microsoft.com/downloads/d...2-d778db920826

Maybe chat with your IT Dept and see if this is an active issue within your version of office.

The paranoid control freaks in my IT Dept are refusing to apply the fix for little ol' me, because it has global implications for the entire network, blah, blah, go figure!

HTH
Cheers
Mark.


Me, myself and I constitute "our" IT Dept.
All of us have various versions:
Microsoft Office 2000 Premium (4 disc set)
" " Student and Teacher Edition 2003
" " Student and Teacher Edition 2007
" " Student and Teacher Edition 2010

And as everybody EXCEPT Microsoft knows, the "help" is jusssst enough
to "justify" the label but no more than that.
Never any real-world WORKING examples, just generic useless pablum,
if any at all.
"On Line" is not much better.

NO useful ideas to automate printing of an object to a <path/<file
name supplied by program.file type fixed by programmer.
Everyone and their pet goldfish wants to print cells - which are
BEHIND the object.

Found that if i cheat like hell by Set Print Area to cells in same
place as object, that if i manually then print to manually set
path/filename.filetype, i get reasonably close to what i visibly want.
Note that is not printing the cells per se, just whatever happens to
be in that area.
And then go back to the program, continue it to reset the various
objects and variables to starting state.

At one time, ages ago, the following worked":

ActivePrinter = "Acrobat PDFWriter on FILE:", PrintToFile:= True, _
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=False, _
Collate:=False, PrToFilename:=pPath + vNam + ".PDF"

....and that was incrementally derived by "hints", similar to what Excel
gives on function equations for a cell.



  #36   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Excel print object?

At one time, ages ago, the following worked":

ActivePrinter = "Acrobat PDFWriter on FILE:", PrintToFile:= True, _
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=False, _


You could try this if supported...

Sub PrintToFile_XPS(Filename$)
Const sPrinter$ = "Microsoft XPS Document Writer on NE00:" '//edit to actual
port address
ActiveWindow.SelectedSheets.PrintOut _
Copies:=1, ActivePrinter:=sPrinter, _
PrintToFile:=True, PrToFileName:=Filename & ".xps"
End Sub

...or use the FixedFormat feature[s]...

Sub SaveAs_FixedFormat(FileType&, Filename$, _
Settings, Optional FromToRng, _
Optional IsGroup As Boolean = False, _
Optional StampIt As Boolean = True)
' Saves the following via ExportAsFixedFormat:
' Selected sheets, 1 file per sheet;
' Or a specified From/To group of sheets to 1 file,
' Or selected sheets (random grouping) to 1 file;
' Or an entire workbook to 1 file.
'
' ArgsIn:
' FileType& xlTypePDF (0) or xlTypeXSP (1)
' Filename$ Contains "<path\<wkbName" to which each wks.Name is appended
' Settings Array containing the settings for the export params
' IsGroup !
'
Dim wks As Worksheet, sExt$, sFile$, sTS$
If Application.VERSION < 12 Then Exit Sub

sExt = IIf(FileType = 0, ".pdf", ".xps") '//always
sTS = "_" & Format(Now(), "_dd-mm-yyyy_hh-mm_AMPM") '//always

If Not IsGroup Then '//1 file per sheet
For Each wks In ActiveWindow.SelectedSheets
sFile = Filename & "_" & wks.name & IIf(StampIt, sTS & sExt, sExt)
wks.ExportAsFixedFormat Type:=FileType, Filename:=sFile, _
Quality:=Settings(0), IncludeDocProperties:=Settings(1), _
IgnorePrintAreas:=Settings(2), OpenAfterPublish:=Settings(3)
Next 'wks

Else '//multiple sheets per file
sFile = Filename & IIf(StampIt, sTS & sExt, sExt)
If Not IsMissing(FromToRng) Then '//it's a group
If Not LBound(FromToRng) = UBound(FromToRng) Then '//it's From/To
ActiveWorkbook.ExportAsFixedFormat Type:=FileType, Filename:=sFile, _
Quality:=Settings(0), IncludeDocProperties:=Settings(1), _
IgnorePrintAreas:=Settings(2), OpenAfterPublish:=Settings(3), _
From:=FromToRng(0), To:=FromToRng(1)

Else '//it's selected sheets (random grouping)
'ExportAsFixedFormat only works with workbooks/worksheets,
'so copy selected sheets to a new (temp) workbook,
'export it, then discard it.
Application.ScreenUpdating = False '//hide activity
ActiveWindow.SelectedSheets.Copy
With ActiveWorkbook
.ExportAsFixedFormat Type:=FileType, Filename:=sFile, _
Quality:=Settings(0), IncludeDocProperties:=Settings(1), _
IgnorePrintAreas:=Settings(2), OpenAfterPublish:=Settings(3)
.Close SaveChanges:=False
End With 'ActiveWorkbook
Application.ScreenUpdating = True
End If 'Not LBound(FromToRng) = UBound(FromToRng)

Else '//all sheets
ActiveWorkbook.ExportAsFixedFormat Type:=FileType, Filename:=sFile, _
Quality:=Settings(0), IncludeDocProperties:=Settings(1), _
IgnorePrintAreas:=Settings(2), OpenAfterPublish:=Settings(3)
End If 'Not IsMissing(FromToRng)
End If 'Not IsGroup
End Sub 'SaveAs_FixedFormat

Sub Test_SaveAs_FixedFormat()
' Shows the various ways to use the SaveAs_FixedFormat routine.
' How the values passed to it are assembled is up to you!
' This example's focus is on how to prep the args only.

Dim sFile$, rng, vSettings
Const lTypePDF& = 0: Const lTypeXPS& = 1

'ExportAsFixedFormat accepts the following ArgsIn:
' Quality: Standard=0, Minimum=1 (file size)
' IncludeDocProperties: False=0, True=1
' IgnorePrintAreas: False=0, True=1
' OpenAfterPublish: False=0, True=1
'We pass our preferences for these to SaveAs_FixedFormat as a variant array.
vSettings = Split("0,0,0,0", ",") '//edit to suit


'[Construct the Filename according to output path]
'NOTE: Do not include the filename extension
'when using the ExportAsFixedFormat feature.

'If output to ActiveWorkbook.Path, use
'.....................................
sFile = Split(ActiveWorkbook.FullName, ".")(0)
'Edit workbook ref to suit

'If output to a different path, use
'..................................
'Build sFile in logical steps
sFile = "C:\Users\Garry\Documents\VBA_Stuff\" '//path
'Append the filename as per your requirements
sFile = sFile & Split(ActiveWorkbook.name, ".")(0)
'Edit workbook ref to suit


'[Specifying a range of sheets, or a selected sheets grouping]
'................................................. ............
'To Export StartWith/EndWith range of sheets, use
rng = Split("1,2", ",") '//From=rng(0),To=rng(1)
'OR
'To Export a random grouping as selected while pressing 'Ctrl', use
rng = Split("1", ",") '//makes LBound=UBound


'[Exporting scenarios]
'To Export 1 file per selected sheet (random grouping)
SaveAs_FixedFormat FileType:=lTypeXPS, Filename:=sFile, Settings:=vSettings
'OR
SaveAs_FixedFormat FileType:=lTypePDF, Filename:=sFile, Settings:=vSettings


'To Export a From/To range of sheets to 1 file
rng = Split("1,2", ",")
SaveAs_FixedFormat FileType:=lTypeXPS, Filename:=sFile, _
Settings:=vSettings, IsGroup:=True, FromToRng:=rng
'OR
SaveAs_FixedFormat FileType:=lTypePDF, Filename:=sFile, _
Settings:=vSettings, IsGroup:=True, FromToRng:=rng


'To Export selected sheets to 1 file (random grouping)
rng = Split("1", ",")
SaveAs_FixedFormat FileType:=lTypeXPS, Filename:=sFile, _
Settings:=vSettings, IsGroup:=True, FromToRng:=rng
'OR
SaveAs_FixedFormat FileType:=lTypePDF, Filename:=sFile, _
Settings:=vSettings, IsGroup:=True, FromToRng:=rng


'To Export all sheets to 1 file
SaveAs_FixedFormat FileType:=lTypeXPS, Filename:=sFile, _
Settings:=vSettings, IsGroup:=True
'OR
SaveAs_FixedFormat FileType:=lTypePDF, Filename:=sFile, _
Settings:=vSettings, IsGroup:=True
End Sub 'Test_SaveAs_FixedFormat

Sub PrintTo_FixedFormat(FileType&, Filename$, _
Optional NumCopies& = 1, Optional FromToRng, _
Optional IsGroup As Boolean = False, _
Optional StampIt As Boolean = True)
' Prints the following choices via XPS Document Writer OR PDF printer,
' as specified by 'FileType':
' Selected sheets, 1 file per sheet;
' Or a specified From/To range of sheets to 1 file,
' Or selected sheets (random grouping) to 1 file;
' Or an entire workbook to 1 file.
'
' ArgsIn:
' FileType& lTypePDF=0; lTypeXPS=1
' Filename Contains "<path\<wkbName"
' NumCopies !
' IsGroup !
'
Dim wks As Worksheet, sExt$, sFile$, sStamp$
Dim sPrinter$, sDfltPrn$

Const sPrnXPS$ = "Microsoft XPS Document Writer on NE00:"
Const sPrnPDF$ = "deskPDF on DDM:"
'To quickly find the port your 'FileType' printer uses,
' - change the printer in the Print dialog and close without printing;
' - in the VBE Immediate Window type the following, then press 'Enter';
' ?activeprinter
' - reset the printer in the Print dialog to your default!

'Initialize essential vars
sDfltPrn = Application.ActivePrinter '//reset when done
sPrinter = IIf(FileType = 0, sPrnPDF, sPrnXPS)
sExt = IIf(FileType = 0, ".pdf", ".xps")
sStamp = "_" & Format(Now(), "dd-mm-yyyy_hh-mm_AMPM")

If Not IsGroup Then '//1 file per sheet
For Each wks In ActiveWindow.SelectedSheets
sFile = Filename & "_" & wks.name & IIf(StampIt, sStamp & sExt, sExt)
wks.PrintOut ActivePrinter:=sPrinter, Copies:=NumCopies, _
PrintToFile:=True, PrToFileName:=sFile
Next 'wks

Else
sFile = Filename & IIf(StampIt, sStamp & sExt, sExt)
If Not IsMissing(FromToRng) Then '//it's a range
If Not LBound(FromToRng) = UBound(FromToRng) Then
ActiveWorkbook.PrintOut From:=CLng(FromToRng(0)),
To:=CLng(FromToRng(1)), _
ActivePrinter:=sPrinter, Copies:=NumCopies, PrintToFile:=True,
PrToFileName:=sFile

Else '//it's a random grouping
ActiveWindow.SelectedSheets.PrintOut ActivePrinter:=sPrinter, _
Copies:=NumCopies, PrintToFile:=True, PrToFileName:=sFile
End If 'Not LBound(FromToRng) = UBound(FromToRng)

Else
ActiveWorkbook.PrintOut ActivePrinter:=sPrinter, Copies:=NumCopies, _
PrintToFile:=True, PrToFileName:=sFile
End If 'Not IsMissing(FromToRng)
End If 'Not IsGroup

Application.ActivePrinter = sDfltPrn
End Sub 'PrintTo_FixedFormat

Sub Test_PrintTo_FixedFormat()
' Shows the various ways to use the PrintTo_FixedFormat routine.
' How the values passed to it are assembled is up to you!
' This example's focus is on how to prep the args only.

Dim sFile$, rng
Const lTypePDF& = 0: Const lTypeXPS& = 1

'[Construct the Filename according to output path]
'NOTE: Do not include the filename extension
'when using an XPS Document Writer.

'If output to ActiveWorkbook.Path, use
'.....................................
sFile = Split(ActiveWorkbook.FullName, ".")(0)
'Edit workbook ref to suit

'If output to a different path, use
'..................................
'Build sFile in logical steps
sFile = "C:\Users\Garry\Documents\VBA_Stuff\" '//path
'Append the filename as per your requirements
sFile = sFile & Split(ActiveWorkbook.name, ".")(0)
'Edit workbook ref to suit


'[Specifying a range of sheets, or a selected sheets grouping]
'................................................. ............
'To print StartWith/EndWith range of sheets, use
rng = Split("1,2", ",") '//From=rng(0),To=rng(1)
'OR
'To print a random grouping as selected while pressing 'Ctrl', use
rng = Split("1", ",") '//makes LBound=UBound


'[Printing scenarios]
'To print 1 file per selected sheet (random grouping)
PrintTo_FixedFormat FileType:=lTypeXPS, Filename:=sFile
'OR
PrintTo_FixedFormat FileType:=lTypePDF, Filename:=sFile


'To print a From/To range of sheets to 1 file
rng = Split("1,2", ",")
PrintTo_FixedFormat FileType:=lTypeXPS, Filename:=sFile, IsGroup:=True,
FromToRng:=rng
'OR
PrintTo_FixedFormat FileType:=lTypePDF, Filename:=sFile, IsGroup:=True,
FromToRng:=rng


'To print selected sheets to 1 file (random grouping)
rng = Split("1", ",")
PrintTo_FixedFormat FileType:=lTypeXPS, Filename:=sFile, IsGroup:=True,
FromToRng:=rng
'OR
PrintTo_FixedFormat FileType:=lTypePDF, Filename:=sFile, IsGroup:=True,
FromToRng:=rng


'To print all sheets to 1 file
PrintTo_FixedFormat FileType:=lTypeXPS, Filename:=sFile, IsGroup:=True
'OR
PrintTo_FixedFormat FileType:=lTypePDF, Filename:=sFile, IsGroup:=True
End Sub 'Test_PrintTo_FixedFormat

--
Garry

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

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I print an object in Excel 2007 MAF Excel Discussion (Misc queries) 2 April 4th 09 03:40 AM
Print Word Object in Excel Mac Excel Discussion (Misc queries) 7 March 2nd 07 06:12 PM
Why does a pasted object in Excel sometimes print upside down? Mel Excel Discussion (Misc queries) 2 December 2nd 05 03:07 PM
Print more then one page in excel from a word object Alex Martinez Excel Worksheet Functions 0 October 14th 05 06:22 AM


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"