Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #11   Report Post  
Old February 11th 20, 08:50 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Dec 2007
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  
Old February 11th 20, 04:34 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2011
Posts: 3,762
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  
Old February 12th 20, 07:26 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Dec 2007
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  
Old February 12th 20, 11:27 PM posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,152
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  
Old February 14th 20, 07:49 AM posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Dec 2007
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  
Old February 14th 20, 06:43 PM posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,152
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  
Old February 15th 20, 07:59 AM posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Dec 2007
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  
Old February 15th 20, 11:21 AM posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,152
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  
Old February 15th 20, 05:08 PM posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Feb 2020
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  
Old February 15th 20, 05:15 PM posted to alt.computer,microsoft.public.excel,microsoft.public.excel.newusers,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Feb 2020
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


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 01:18 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017