how to prevent a bitmap from "bleeding" over two pages?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

(I thought that I posted this last night but, for whatever reason, it doesn't
appear in the discussion group. So, I'm posting it, again. Sorry if this is
a duplicate.)

At the very end of my macro, I "Insert Picture From File." The bitmap is
"inserted" at the end (after the last row) of my data. The problem is that
the data can end on practically any Row (my results vary all the time) and,
when the spreadsheet is printed, the printout can be anywhere from 1 to 4
pages. So when I insert the bitmap, half the bitmap might print at the
bottom of page two and then the rest of it prints at the top of page three.
(or it bleeds over pages 1 and 2 or pages 3 and 4, again depending upon how
much data there is). I need to make sure that the whole bitmap is printed
together on the same page.

So, how can I "tell" the macro to insert the bitmap at the top of the next
page if (and only if) it won't totally fit on the previous page?

FYI, I'm not sure how often my macro executes the following (partial)
command but it does exist in the macro so I'm listing it here, just in case
it matters (this sets the page length to 74 lines, I think?):
i = Val(lrow) / 74

Thanks. Dan

(I'm a salesman, not a programmer.)
 
Place your graphic entirely inside a row.
Since Excel usually won't split a single row over two pages,
that eliminates the problem.
You can grab the picture height and size the row so it is just
slightly taller.
The maximum row height is 409, or about the 30 to 40 normal
sized rows, so graphic size should not be a problem.

The "Print Selections Only" add-in, at my website, uses that technique.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"crimsonkng"
<[email protected]>
wrote in message
(I thought that I posted this last night but, for whatever reason, it doesn't
appear in the discussion group. So, I'm posting it, again. Sorry if this is
a duplicate.)

At the very end of my macro, I "Insert Picture From File." The bitmap is
"inserted" at the end (after the last row) of my data. The problem is that
the data can end on practically any Row (my results vary all the time) and,
when the spreadsheet is printed, the printout can be anywhere from 1 to 4
pages. So when I insert the bitmap, half the bitmap might print at the
bottom of page two and then the rest of it prints at the top of page three.
(or it bleeds over pages 1 and 2 or pages 3 and 4, again depending upon how
much data there is). I need to make sure that the whole bitmap is printed
together on the same page.

So, how can I "tell" the macro to insert the bitmap at the top of the next
page if (and only if) it won't totally fit on the previous page?

FYI, I'm not sure how often my macro executes the following (partial)
command but it does exist in the macro so I'm listing it here, just in case
it matters (this sets the page length to 74 lines, I think?):
i = Val(lrow) / 74

Thanks. Dan

(I'm a salesman, not a programmer.)
 
Place your graphic entirely inside a row.
Since Excel usually won't split a single row over two pages,
that eliminates the problem.
You can grab the picture height and size the row so it is just
slightly taller.
The maximum row height is 409, or about the 30 to 40 normal
sized rows, so graphic size should not be a problem.

The "Print Selections Only" add-in, at my website, uses that technique.
--
Jim Cone
San Francisco, USAhttp://www.realezsites.com/bus/primitivesoftware

"crimsonkng"
<[email protected]>
wrote in message
(I thought that I posted this last night but, for whatever reason, it doesn't
appear in the discussion group. So, I'm posting it, again. Sorry if this is
a duplicate.)

At the very end of my macro, I "Insert Picture From File." Thebitmapis
"inserted" at the end (after the last row) of my data. The problem is that
the data can end on practically any Row (my results vary all the time) and,
when the spreadsheet is printed, the printout can be anywhere from 1 to 4
pages. So when I insert thebitmap, half thebitmapmight print at the
bottom of page two and then the rest of it prints at the top of page three.
(or it bleeds over pages 1 and 2 or pages 3 and 4, again depending upon how
much data there is). I need to make sure that the wholebitmapis printed
together on the same page.

So, how can I "tell" the macro to insert thebitmapat the top of the next
page if (and only if) it won't totally fit on the previous page?

FYI, I'm not sure how often my macro executes the following (partial)
command but it does exist in the macro so I'm listing it here, just in case
it matters (this sets the page length to 74 lines, I think?):
i = Val(lrow) / 74

Thanks. Dan

(I'm a salesman, not a programmer.)


Fantastic idea! Thanks, Jim!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top