View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Pagebreaks problems - Urgent

Carlos,

Instead of copying and pasting the range, why not
just copy the entire sheet as is, and not worry about
the formatting...

oSheet.Copy Befo=Workbooks(NewWorkBook).Worksheets(1)

Regards,
Jim Cone
San Francisco, USA


"Carlos Lozano" wrote in
message ...
Hi,

I have an Excel application that creates a visual design using images. As an
overview the application paste images into the design sheet moving down any
existings images. I find out where the next pagebreak will be to locate the
image before or after a pagebreak to avoid splitting the image in the preview
or when printing.
When the "design" is finished it is exported to another workbook (Saved as).
All the pageSetup settings are set on the new workbook's sheet that will hold
the design on.
In the exporting application everything works find, it finds the pagebreaks
and locate the images just right. The preview or printing never splits any
images.

The problem:
The exported sheet has different pagebreaks even they have same pageSetup
properties. This means if a design is larger than one page, the images are
splitted or wrongly located.

You can find the code of the exportDesign sub below.

I will appreciate any ideas.

Carlos

-snip-