![]() |
#1
|
||||
|
||||
![]()
Hi.
Code:
msgbox activeshape.Text.Story.Characters.Count ~John |
#2
|
|||
|
|||
![]()
Hi again John,
I also have running X4, can you describe your prob a bit more detailed? What text is in there, and what's wrong? Thus far I can just think of paragraphs which may alter your result unexpectedly: A quote from the docs: Quote:
Code:
MsgBox t.Story.Characters.Count - t.Story.Paragraphs.Count |
#3
|
||||
|
||||
![]()
Hi.
I was mostly pointing out the bug. I already worked around it. In X4 create and Artistic text shape and type "test" without quotes. In the VBA intermediate window paste msgbox activeshape.Text.Story.Characters.Count and press enter. Do the same in X5. X4 returns 5 characters and X5 returns 4 as it should. ~John |
#4
|
|||
|
|||
![]()
Hm, I don't know if it's a bug, I guess they just changed the behavior of .Count in X5.
Since it's explicitly stated in the X4 Docs that .Count includes Paragraph breaks, it's reasonable to subtract them and the .Characters.Count - .Paragraphs.Count gives the result of 4, too. But I can't proof this, I don't have the reference of X5 here. If you already solved it, it doesn't matter anyways I guess ![]() |
#5
|
||||
|
||||
![]()
Hi.
Maybe. Probably was a bug though since it was changed in X5. My problem was that I was checking next characters for a space. In X4, code that worked in X5 just needed another check. Code:
If i = n2 Then 'n2 is textrange count t.Font = strFont ElseIf s.Text.Story.Characters(i + 1) <> "" Then 'added extra check If VBA.AscW(s.Text.Story.Characters(i + 1)) = 32 Then t.Font = strFont End If ..............bla bla |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Jeff's Delete Small Objects macro | gorgo2 | Feature requests/wishlist | 37 | 09-05-2010 22:40 |
Large month + 2 small | bojtren | Calendar Wizard | 1 | 13-04-2010 02:32 |
count colors in PP | Jeff Harrison | Corel Photo-Paint VBA | 0 | 17-12-2008 03:38 |
Reading text file, one character at a time | CWCN | CorelDRAW/Corel DESIGNER VBA | 1 | 16-10-2008 14:24 |
Delete small objects macro | Jeff Harrison | New product ideas | 3 | 19-05-2007 13:19 |