Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-09-2012, 05:05 AM
Isadora Isadora is offline how to convert cm to points for footers and headers Windows 7 32bit how to convert cm to points for footers and headers Office 2007
Novice
how to convert cm to points for footers and headers
 
Join Date: Mar 2012
Location: Milan, Italy
Posts: 18
Isadora is on a distinguished road
Post 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?
Reply With Quote
  #2  
Old 05-09-2012, 11:35 PM
macropod's Avatar
macropod macropod is offline how to convert cm to points for footers and headers Windows 7 64bit how to convert cm to points for footers and headers Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You can use a user-defined CentimetersToPoints function:
Code:
Function CentimetersToPoints(Cm As Single)
CentimetersToPoints = Cm * 28.3464566929134
End Function
which you might call like:
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]
Reply With Quote
  #3  
Old 07-11-2012, 02:38 AM
Isadora Isadora is offline how to convert cm to points for footers and headers Windows 7 32bit how to convert cm to points for footers and headers Office 2007
Novice
how to convert cm to points for footers and headers
 
Join Date: Mar 2012
Location: Milan, Italy
Posts: 18
Isadora is on a distinguished road
Default

Thank you! That works!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to convert cm to points for footers and headers 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

Other Forums: Access Forums

All times are GMT -7. The time now is 11:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft