1) Toggle for pixels, centimetes and millmeters
2) Toggle for Inches, Foot
PLEASE GIVE A COMMAND TO TOGGLE ANY COMMAND IN CORELDRAW (FEATURES REQUEST)
SO THAT USER ADDS THEIR DESIRED COMMANDS IN A SET EITHER 2 OR THREE OR FOUR.... FOR ONE SHORTCUT.
pkg_sriram said:1) Toggle for pixels, centimetes and millmetersplease-give-a-macro-for-toggling"2) Toggle for Inches, Foot
Sub change_rulers_Hunits_1() If Not ActiveDocument Is Nothing Then Select Case ActiveDocument.Rulers.HUnits Case cdrPixel ActiveDocument.Rulers.HUnits = cdrCentimeter Case cdrCentimeter ActiveDocument.Rulers.HUnits = cdrMillimeter Case Else ActiveDocument.Rulers.HUnits = cdrPixel End Select Else MsgBox "No document is active." End If End Sub Sub change_rulers_Hunits_2() If Not ActiveDocument Is Nothing Then Select Case ActiveDocument.Rulers.HUnits Case cdrInch ActiveDocument.Rulers.HUnits = cdrFoot Case Else ActiveDocument.Rulers.HUnits = cdrInch End Select Else MsgBox "No document is active." End If End Sub
ESKIMO SIR, Lots of hugs, Thanking you so much sir
sir only width is updated, vertical field is not updating sir. please correct the macro sir
Sorry; I had forgotten that the horizontal and vertical rulers units are independent of each other.
These subs should change both horizontal and vertical:
Sub change_rulers_units_1() If Not ActiveDocument Is Nothing Then Select Case ActiveDocument.Rulers.HUnits Case cdrPixel ActiveDocument.Rulers.HUnits = cdrCentimeter ActiveDocument.Rulers.VUnits = cdrCentimeter Case cdrCentimeter ActiveDocument.Rulers.HUnits = cdrMillimeter ActiveDocument.Rulers.VUnits = cdrMillimeter Case Else ActiveDocument.Rulers.HUnits = cdrPixel ActiveDocument.Rulers.VUnits = cdrPixel End Select Else MsgBox "No document is active." End If End Sub Sub change_rulers_units_2() If Not ActiveDocument Is Nothing Then Select Case ActiveDocument.Rulers.HUnits Case cdrInch ActiveDocument.Rulers.HUnits = cdrFoot ActiveDocument.Rulers.VUnits = cdrFoot Case Else ActiveDocument.Rulers.HUnits = cdrInch ActiveDocument.Rulers.VUnits = cdrInch End Select Else MsgBox "No document is active." End If End Sub
Yes sir Working