OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 27-05-2008, 14:58
bprice's Avatar
bprice bprice is offline
Join Date: Oct 2006
Location: Edmundston, New Brunswick, Canada
Posts: 89
Default non-printing character???

Hey everyone... I don't remember what these are called other than non-printing characters... BUT... I have a script that looks like this....

Dim S As Shape
Dim Stuff As String

Set S = ActiveLayer.Shapes.FindShape("site", cdrTextShape)
If S Is Nothing Then GoTo Ending:

Stuff = S.Text.Story.Text

LocationBox.Text = Stuff

"Site" refers to a peice of artistic text. By default it XX (but it could contain anything)... and when I run the script, I get the non-printing character(see attached picture). It's always at the beginning.

The odd thing is if I...

Msgbox Stuff
...I get see XX in my Msgbox! However, if I say something like...

If Stuff = "XX" Then
MsgBox "Hi"
... it won't work because apparently it see's the non-printing character?

I don't understand... is this something anyone can shed some light on?

Thanks ahead of time!


And just a heads up... no... there is no "space" at the beginning of my artist text!
Attached Images

Last edited by bprice; 27-05-2008 at 15:00. Reason: Forgot to mention "no space" at bottom of post
Reply With Quote
Old 27-05-2008, 18:12
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4

It looks like you have a line break in front of you line. Try this:

Msgbox Asc(Stuff)
I'm sure it would show "13".

Place text cursor into the text object, and try using Left/Right arrow keys to see if there is an invisible character in the object...
Reply With Quote
Old 28-05-2008, 05:42
bprice's Avatar
bprice bprice is offline
Join Date: Oct 2006
Location: Edmundston, New Brunswick, Canada
Posts: 89
Default odd

amazing! thank you alex! the odd thing is that when i place my cursor in the text and move it with the arrows it doesn't show the "extra" characters or anything... however, i hit backspace a times in front of the first character and ran the script again and it worked perfect!

very strange! I'd have never figured that out! thanks a million!
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Characters to the right of a special character norbert_ds CorelDRAW/Corel DESIGNER VBA 3 03-05-2007 20:59
Printing to Epson printers RonHill General 1 30-12-2005 19:32
CDR12: TTF Font exporting - specify character code zlatev CorelDRAW/Corel DESIGNER VBA 0 03-12-2005 05:54
insert a character by vba beny04 CorelDRAW/Corel DESIGNER VBA 8 16-05-2005 02:45
Draw 12 : Printing Problem Hernán General 3 20-09-2004 10:54

All times are GMT -5. The time now is 04:25.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com