OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27-05-2008, 15:58
bprice's Avatar
bprice bprice is offline
Member
 
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....

Code:
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

Ending:
"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...

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

Code:
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!

B

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 16:00. Reason: Forgot to mention "no space" at bottom of post
Reply With Quote
  #2  
Old 27-05-2008, 19:12
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

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

Code:
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
  #3  
Old 28-05-2008, 06:42
bprice's Avatar
bprice bprice is offline
Member
 
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
Reply


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 21:59
Printing to Epson printers RonHill General 1 30-12-2005 20:32
CDR12: TTF Font exporting - specify character code zlatev CorelDRAW/Corel DESIGNER VBA 0 03-12-2005 06:54
insert a character by vba beny04 CorelDRAW/Corel DESIGNER VBA 8 16-05-2005 03:45
Draw 12 : Printing Problem Hernán General 3 20-09-2004 11:54


All times are GMT -5. The time now is 08:37.


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