ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Controling alignment in header (https://www.excelbanter.com/excel-programming/401408-controling-alignment-header.html)

Peter Karlström

Controling alignment in header
 
Hi

I'm trying to create a readable header in an Excel-project, which is a COM
Addin.
The header is supposed to look like this:

LOGO Subject: Subjectdata Date:
2007-11-20 Page 1/2
Author: Peter Time:
10:45:12

I tried use the Left-, Center- and RightHeader parts of PageSetup, but the
default alignment makes i look like this:

LOGO Subject: Subjectdata Date:
2007-11-20 Page 1/2
Author: Peter
Time: 10:45:12

Is there a workaround for this?

Thanks in advance

--
Peter Karlström
Midrange AB
Sweden

Bill Renaud

Controling alignment in header
 
Sorry, the word-wrap in the newsgroup ruined your post. Use a text editor
and use spaces, not Tab characters, to separate the Left, Center, and Right
portions of the Header and Footer. Keep each line shorter than 70
characters, then re-post your question. You may have to explain what is
supposed to be centered, right aligned, etc.

--
Regards,
Bill Renaud




Peter Karlström

Controling alignment in header
 
Hi Bill

Sorry for the mess...

This is what it was intend to show:

My intention: (after the line)
LeftHeader CenterHeader RightHeader
-------------------------------------------------------------------------
LOGO Subject: Subjectdata Date: 2007-11-20 Page 1/2
Author: Peter Time: 10:45:12

LeftHeader contains a Logo picture
CenterHeader contains Subject and Author
RightHeader contains Date, Time and page

It seems the CenterHeader is Centeraligned and the RightHeader Rightaligned
which produces somthing like this instead: (after the line)

LeftHeader CenterHeader RightHeader
------------------------------------------------------------------------
LOGO Subject: Subjectdata Date: 2007-11-20 Page 1/2
Author: Peter Time: 10:45:12


The output isn't necessary to be put in these three headers. The important
thing is the "look" of it all.

Hope this shows better than the last try...

Regards

--
Peter Karlström
Midrange AB
Sweden


"Bill Renaud" wrote:

Sorry, the word-wrap in the newsgroup ruined your post. Use a text editor
and use spaces, not Tab characters, to separate the Left, Center, and Right
portions of the Header and Footer. Keep each line shorter than 70
characters, then re-post your question. You may have to explain what is
supposed to be centered, right aligned, etc.

--
Regards,
Bill Renaud





Bill Renaud

Controling alignment in header
 
So you want "Author: Peter" centered under "Subject: Subjectdata" and
"Time: 10:45:12" centered under "Date: 2007-11-20 Page 1/2"?
Or should they be left-aligned under each part?

I'll have to experiment with Excel some (unfortunately I still use Excel
2000, so may not be able to correctly answer this question). Maybe an MVP
has something on their web site somewhere.

As a work-around, you might have to set all of the Headers to nothing, set
the Top Margin to the Header Margin (say 0.75"), then enter this
information on rows 1 and 2 of your worksheet, start your worksheet data on
row 4 (leave row 3 blank), then declare rows 1 through 4 as Print Titles.

--
Regards,
Bill Renaud




Peter Karlström

Controling alignment in header
 
Hi Bill

Yes, I want them left aligned respectivelyunder each part.
B but if I use the Left align code (&L) in any of the Center or
Right-headers, it all ends upp on row 1 in the left most corner
of the header, over the logotype.

Sorry about the Print Tile suggestion, but I have to leave the contents
of the spreadsheet out of this. (Customers orders....)

I'll look around on the MVP-site, to see if they have any hints.

Regards

--
Peter Karlström
Midrange AB
Sweden


"Bill Renaud" wrote:

So you want "Author: Peter" centered under "Subject: Subjectdata" and
"Time: 10:45:12" centered under "Date: 2007-11-20 Page 1/2"?
Or should they be left-aligned under each part?

I'll have to experiment with Excel some (unfortunately I still use Excel
2000, so may not be able to correctly answer this question). Maybe an MVP
has something on their web site somewhere.

As a work-around, you might have to set all of the Headers to nothing, set
the Top Margin to the Header Margin (say 0.75"), then enter this
information on rows 1 and 2 of your worksheet, start your worksheet data on
row 4 (leave row 3 blank), then declare rows 1 through 4 as Print Titles.

--
Regards,
Bill Renaud





Jialiang Ge [MSFT]

Controling alignment in header
 
Hello Peter,

From your post, my understanding on this issue is: you want to customize
the alignment of text in center part of excel worksheet header. If I'm off
base, please feel free to let me know.

According to Excel product team's description of Excel Headers and Footers:
http://blogs.msdn.com/excel/archive/...10/572656.aspx, it is not
supported/documented to make the center part left aligned by design. When
the layout of the header is complicated, we usually recommend customers to
move the header to the worksheet body. Since your customer does not allow
it, we need to either carefully adjust the position of text by adding
spaces between Author and Time, or try to find some tricks to work-around
it. I have sent an email to the product team, to see if they have any
suggestions. I will get back to you as soon as possible.

As for the Left align code (&L), it is used to determine which part (left
part/center part/right part) should the text be located. For instance,
mso-header-data : '&R Date: &D Time: &T'; will put the Date time in the
right part of header. Therefore, it does not help in this issue.

Sincerely,
Jialiang Ge , remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Jialiang Ge [MSFT]

Controling alignment in header
 
Hello Peter,

A member from the product team told me that he also does not have a better
resolution. I am writing to check the status of the issue in your side.
Have you found any trick to resolve it?

Regards,
Jialiang Ge



All times are GMT +1. The time now is 06:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com