Finding symbols

F

Frans van Zelm

Hi there,

(I use PPt XP)

I wrote a procedure that finds manually added formatting (fonts) in my
presentation. It works (a bit).
((Minor problems to be solved:
- to search the note pages (I might solve that today ;-) )
- to skip diagrams (error message: object can not contain text)
- to select the characters with the specified font (till now, the
procedure
stops at a selected slide) ))

I noticed that fonts that are added by Insert-Symbol are not found. It looks
like they are 'wrapped'. On the slide, the font is not shown either.

What to do to make my procedure those symbols?

Thanks for your help.

Frans van Zelm

(By the way: shouldn't PPt XP use a Find/Replace routine like Word and
Excel? They find characters inclusive formatting.)
 
S

Shyam Pillai

Yes, you will not be able to detect them thru normal routines. Usually there
are in the >255 value so use CHRW to detect such text and then copy to
clipboard to read the font information from the clipboard or parse the html
project for the font information.
 
F

Frans van Zelm

Dear mr. Pillai,

Thanks for your answer. It makes me feel less stupid, not finding the
'symbols'. I hit your site frequently these days. Thanks again.

But then: what people wrote PPt? (See also your <F1> response.) Quote
Bush: 'Let's get the basterds ...' On the other hand: I appreciate most of
the program.

I have bad luck. Many of my symbols are in the low segment, e.g. the
dialog look-a-likes in font Marlett. But I will try CHRW() ...

Frans van Zelm
 
S

Shyam Pillai

A combination of AscW and ChrW should be able to do it.

The AscW function returns the Unicode character code except on platforms
where Unicode is not supported, in which case, the behavior is identical to
the Asc function.

The ChrW function returns a String containing the Unicode character except
on platforms where Unicode is not supported, in which case, the behavior is
identical to the Chr function

Regards
Shyam Pillai
 
F

Frans van Zelm

Dear mr. Pillai,

In the mean time I have done some thinking.

Using the Asc(w) or Chr(w) would mean that I should test for tenths of
values: all smileys, dialog look-a-like characters, etc. (The routine must
check over 800 slides, so it will take a long time to run.)

Do you perhaps know a way to simply find locations where I used the
Insert-Symbol command for any character. I already have the framework to
scan all shapes on all slides (note pages included, by now ;-) ).

And there is soemthing else:
I used to write my error handler something like:
On Error Goto trouble
...
trouble:
Select Case Err
Case #
...
Resume Next
Case Else
...
End Select
Is this also applicable to the PPt-VBA envorinment? I have some difficulty
to trap errors.

Kind regards, Frans van Zelm
 
S

Shyam Pillai

Frans van Zelm,
I've provided you information which will guide you towards to solution. But
you will need to figure it out yourself in this case since I've sold the
implementation of this solution to another company and hence I cannot post
the code here. With some clever optimization it will run fast.
And there is soemthing else:
I used to write my error handler something like:
On Error Goto trouble
...
trouble:
Select Case Err
Case #
...
Resume Next
Case Else
...
End Select
This works in a VBA environment too. What is the problem you are
encountering?


--
Regards
Shyam Pillai

Handout Wizard: http://www.mvps.org/skp/how/
 
S

Shyam Pillai

Here is one more hint to make it complete. Visually compare the string
representation on the slide with the string returned when you query the
textrange containing the symbol. See anything different?
 
F

Frans van Zelm

Dear mr. Pillai,

(I've cut of the trail ...)

Yes, I see what you mean. At least, I see a ... '?'. In Excel, a similar
thing
happens when you format a cell containing a symbol character.
Let me think. perhaps I could search the questionmarks, not being in my
default font(s). I'll come back to tell if it worked.

On the error trapping:
VB-errors work as usual (9, 13, etc.). But PPt seems to always produce
-2147188160 if things go wrong. Now, I use the first 25 characters of the
error description to find the sore spot.

Frans van Zelm
 
S

Shyam Pillai

Frans van Zelm,
You are almost there. Now you know that only if you encounter a ? in the
text range then you need to check for a symbol. That should speed up the
process. For the next part you need to know if you are indeed dealing with
a symbol or just another question mark (?) thats where Asc and AscW come
handy. If it is indeed a question mark then Asc and AscW return the same
value (63) but if it is not then AscW will return the unicode value of the
string while Asc will return 63..
--
Regards
Shyam Pillai

Animation Carbon - http://www.mvps.org/skp/ac/index.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top