#1
|
|||
|
|||
how to convert cm to points for footers and headers
I am working for 4 companies, and thus I have to use 4 different letterheads.
I made a set of 4 macros, that each add header+footer to my documents. I am struggling to get the header and footer in the exact size as in the original letterheads (I have them in print, only, thus I am using a rule to measure their sizes). Due to the char limit (250) I am forced to add header/footers as images (1 image for the header + 1 image for the footer). How do I convert the image size from cm to point, so that I can add this setting in the VB code? I did some research online but it's very confusing. For now, I have been using the "record macro" function so that I manually adjust the size of the header/footer image inserting the measuring in cm from the properties tab (page layout > page setting > customize header > add image > set image properties) but it never get it exactly as I want (not down to the mm) as: 1) there is always some space around my image 2) there is some resizing from the printer 3) I want to set a customized header/footer margin, too Why can't I use cm in the VB code? Or is there a workaround on the char limit, so that I can actually type the header/footer instead of using images? |
#2
|
||||
|
||||
You can use a user-defined CentimetersToPoints function:
Code:
Function CentimetersToPoints(Cm As Single) CentimetersToPoints = Cm * 28.3464566929134 End Function Code:
Sub Demo() Dim cht As ChartObject Set cht = ActiveSheet.ChartObjects.Add(Left:=CentimetersToPoints(3), Top:=CentimetersToPoints(4), Width:=CentimetersToPoints(6), Height:=CentimetersToPoints(5)) End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you! That works!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using tables for headers and footers | Ulodesk | Word | 4 | 05-09-2012 02:28 PM |
Having trouble with headers and footers | dreamz720 | Word | 1 | 08-24-2011 08:26 AM |
Headers and Footers | OverAchiever13 | Word | 1 | 05-27-2010 01:30 PM |
Changing colours on headers/footers | Shocker | Word | 1 | 04-30-2010 03:55 PM |
Editable text in headers/footers | AlexSmalley | Word | 0 | 08-10-2009 07:34 AM |