Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default setting the Left or Right HeaderPicture

Hi,
I am working in c# and I am trying to set the HeaderImage of a worksheet. I
have tried several methods:

Excel.PageSetup pageSetup = (Excel.PageSetup)xlSheet.PageSetup;
pageSetup.LeftHeaderPicture.Filename = @"C:\image.gif";

as well as:

Bitmap bitmap = new ");
pageSetup.LeftHeaderPicture = bitmap;

neither of these seem to work.

There is very little documentation on this feature, can anyone help?

Cheers

Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default setting the Left or Right HeaderPicture

Marks,
According to the VBA Help:
<Quote
With ActiveSheet.PageSetup.LeftHeaderPicture
.FileName = "C:\Sample.jpg"
......... etc

' Enable the image to show up in the left header.
ActiveSheet.PageSetup.LeftHeader = "&G"

End Sub
Note It is required that "&G" is a part of the LeftHeader property string
in order for the image to show up in the left header.

</Quote

NickHK

"mark_newbs" wrote in message
...
Hi,
I am working in c# and I am trying to set the HeaderImage of a worksheet.

I
have tried several methods:

Excel.PageSetup pageSetup =

(Excel.PageSetup)xlSheet.PageSetup;
pageSetup.LeftHeaderPicture.Filename = @"C:\image.gif";

as well as:

Bitmap bitmap = new ");
pageSetup.LeftHeaderPicture = bitmap;

neither of these seem to work.

There is very little documentation on this feature, can anyone help?

Cheers

Mark



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
change from left-to-right as default setting Rauf A. Khokhar Setting up and Configuration of Excel 0 June 11th 08 09:48 AM
How to make a cell appear in upper left (top left) corner of works jeff Excel Programming 2 March 6th 07 10:14 PM
Setting left position works in XL 2k and 2002 but.. Peter Ostermann[_3_] Excel Programming 5 May 19th 06 02:41 AM
Error Setting Excel's Application.Left Property James Cox[_2_] Excel Programming 0 December 9th 04 09:13 PM
Setting bkcolor on active cell when left mouse doubleclikked Jan Eikeland Excel Programming 3 December 12th 03 12:45 PM


All times are GMT +1. The time now is 09:37 AM.

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

About Us

"It's about Microsoft Excel"