PS: You can adjust the properties of a Header/Footer image (including Size) in Excel...
- Click in the Header/Footer box containing &[Picture]
- Click the Format Picture button on the Header/Footer toolbar
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi there,
I'm going a little crazy with this one!
I've developed some Excel templates for a client with their logo inserted in top left header, their client's logo in top right header. I've set up 30+ WBs with client logo already in place and am now working on an add-in that they can apply to existing workbooks, that formats in the same way, inserting the logos for them. Client is using Excel 2011.
I used Excel 2010 to set them up because, when I tried inserting images into the headers with 2011, the logos went in crazily oversized (looks about 5 times bigger). When I insert through Excel 2010, the logo goes in at the exact same size as the image file. The catch is that the client will need to insert logos using the mac version only, so I need to find a way to insert an image in the header at the same size as the file.
When I insert the logo into the sheet in 2011, it comes up at the correct size. But when I insert the exact same file (300dpi jpeg) into the header, it is wildly oversized (see screenshot below).
Does anyone have any idea what is causing this weird oversizing? Or if there is any way to override it?
Thanks in advance,
Joseph
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
PS: You can adjust the properties of a Header/Footer image (including Size) in Excel...
Hi Bob,
The image files can be downloaded here. This includes a jpeg and a png (as per Phillip's post above). The png works fine, but the jpeg goes in oversized.
The results are the same whichever steps I take to insert the jpeg into the header. Either:
or
or
With ActiveWorkbook.Worksheets(I).PageSetup.LeftHeaderPicture
.Filename = LogoPath & ":Logo.jpg" 'where LogoPath is a Public Constant defining the filepath
.Height = 257 'these are are pixel dimensions of the inserted image
.Width = 269 'which seem to be completely ignored by Excel when inserting jpegs!
End With
In a way, my issue is half-fixed—based on Phillip's recommendation, I can proceed using pngs instead of jpegs—but still the question remains unanswered: Why does Excel 2011 oversize a jpeg inserted into the header, when other versions of Excel do not?
It is very infuriating!
Hi Phillip,
Thanks for your response. I've had a go at inserting the same image saved as a png instead of jpeg and it seems to work fine.
The question remains unanswered as to why this glitch should occur when inserting jpegs in Excel 2011, when it is no problem in 2010. The weirdest thing about it is that it seems linked to the inserting process itself—WBs with jpeg logos in the header, inserted using 2010, look absolutely fine in 2011. It's only when inserting them via 2011 that they go in oversized. Very odd...
I feel your pain with the inability to apply formats globally to a workbook—it seems like a real functional oversight (and one that leads to a lot of unnecessary work!). The only way around it seems to be to code a loop that applies formatting to each WS in turn, which is workable but clunky.
Anyway, thanks a lot for your input. I'm very grateful to now have a workable solution!
The problem is with the image itself... I'm not sure exactly what causes it or why it's handled differently by Excel 2010, but I opened it in Photoshop, drew a Filled rectangle at the same size as the Background & resaved the file as Logo2. It inserts into an Excel 2011 Header at the designated dimensions. See if you have a different situation with these.
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more