![]() |
|
#1
|
|||
|
|||
|
This is strange. Would you test this please?
This code will show the worldscale in the caption (Thanks Shelby/John). When click on docker (eg. contour, scrapbook, fillet/chamfer) the caption is lost. Help please. Code:
Sub ScaleCaption()
Dim NewCaption As String
Dim lngVersion As Long
Dim strVersion As String, strWorldScale As String
If Not ActiveDocument Is Nothing Then
lngVersion = Application.VersionMajor
Select Case lngVersion
Case 13
strVersion = "X3"
Case 14
strVersion = "X4"
Case 15
strVersion = "X5"
Case Else
strVersion = CStr(lngVersion)
End Select
Select Case ActiveDocument.WorldScale
Case 1
strWorldScale = "1"" = 1"""
Case 2
strWorldScale = "Half"
Case 4
strWorldScale = "3"" = 1'"
Case 8
strWorldScale = "1-1/2"" = 1'"
Case 12
strWorldScale = "1"" = 1'"
Case 16
strWorldScale = "3/4"" = 1'"
Case 24
strWorldScale = "1/2"" = 1'"
Case 32
strWorldScale = "3/8"" = 1'"
Case 48
strWorldScale = "1/4"" = 1'"
Case 64
strWorldScale = "3/16"" = 1'"
Case 96
strWorldScale = "1/8"" = 1'"
Case 128
strWorldScale = "3/32"" = 1'"
Case Else
strWorldScale = ActiveDocument.WorldScale
End Select
NewCaption = "CorelDRAW " & strVersion & " ¨'¨l¨'¨ " & strWorldScale
If AppWindow.Caption <> NewCaption Then AppWindow.Caption = NewCaption
End If
End Sub
Last edited by gorgo; 06-04-2011 at 22:27. |
|
#2
|
||||
|
||||
|
Hi.
Yes. In order to retain the caption throughout program use you will have to trigger this sub with an event. Most likely SelectionChange. -John |
|
#3
|
|||
|
|||
|
Interesting...care to show me how please?
|
|
#4
|
||||
|
||||
|
Hi.
In the ThisMacroStorage module for the project put Code:
Private Sub GlobalMacroStorage_SelectionChange()
YourModuleName.ScaleCaption
End Sub
-John |
|
#5
|
|||
|
|||
|
good stuff.
![]() it switches when docker is selected, but restores the scale caption upon selecting the drawing page. weird but that's much better than before. Thanks much John.
__________________
Using: CorelDraw X4 (14.0.0.701) OS: Windows XP Pro |
|
#6
|
||||
|
||||
|
HI.
Yea. Anytime a selection is changed in the document this code is triggered. Don't put much in this event as it runs often. -John |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reset the Scale Factor to 100% | Hernán | CorelDRAW/Corel DESIGNER VBA | 18 | 12-05-2010 23:48 |
| New X4 Custom Dockers | bprice | CorelDRAW/Corel DESIGNER VBA | 4 | 21-07-2008 11:11 |
| changing Caption | bumblebee | CorelDRAW/Corel DESIGNER VBA | 6 | 13-12-2004 09:13 |
| Label Caption Live Update | ddonnahoe | CorelDRAW/Corel DESIGNER VBA | 10 | 09-04-2004 10:59 |
| Reset the Scale Factor to 100% | Hernán | New product ideas | 12 | 31-12-1969 18:32 |