View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Placing an absolutely positioned image on every printed page

The simplest answer is of to get your stationary pre-printed with the
company logo, then it's not a concern. But assuming you have excluded that
....

To me, printing with these requirements in Excel is a hit and miss affair
and printing outside of the margin from Excel will not be possible
Maybe, depending on the header size, would an Image control work ?
You can place it anywhere on the printable area. You would have to replicate
for each page in code.

Or print the .xls to PDF. Edit the PDF, adding the graphic where you want.
Save and print the PDF.
This could be accomplished from VBA with a suitable PDF component and some
research into manipulating PDFs. Adobe Acrobat (not the Reader, but the full
version) should provide this.
You should be able to place the graphic exactly where want.
Whether it eventually prints correct on the out printer will depend on the
printer's limitations, as they all have some regions (top, bottom, left,
right) that they cannot print to.

Otherwise, maybe a printer replacement class will allow you to do what you
need :
http://vb.mvps.org/samples/project.asp?id=PrnInfo

Or possibly using OpenOffice. It can open Excel file, but I have no idea of
its graphics capabilities regarding your requirements.

NickHK

wrote in message
oups.com...
I have a problem. My office is changing its logo/profile and all
templates needs to be updated. It's a fairly simple layout with the
new company logo as a tif (or eps) placed ~ x:14mm y:7mm from the top
left corner of an A4 sheet. The left margin of the page should be 30mm
(the logo starts within the left margin). When printed as landscape the
logo needs to be rotated 90 degrees and posi-tioned along the right
short side (we want all headers to look the same when the pages are
placed in a folder)

Result: a fairly simple layout, with big problems:

1. The image can't be placed in the header because of the minimum 1
inch "header left margin" default.

2. On a portrait A4 the logo can be positioned in the first row (the
first column has to be left out blank, to compensate for the 30mm left
margin, which isn't very practical) but for landscape this can't be
done as it isn't possible to repeat a column on the right side of the
page.

I'm looking for a macro that places an image exactly x,y from the top
left (or top right when land-scape) of every printed page
(_BeforePrint). Ideally the image needs to be placed outside the
left/right margin. Is it possible to freely place an image outside of
the page margins?

Headaches...

I'm thankful for any help I can get.

deage