I'm running a string comparison on two strings that are identical in every conceivable way and yet the comparison is failing.

One of the strings is s.TextFrame.TextRange.Text, where s is a Shape and the other is the value of a String.

VB Code:
  1. If s.TextFrame.TextRange.Text = theSourceID Then
  2. ...

I've used watches, message boxes and my eyes glued to the screen to verify that the strings are in fact identical. I tried copy the values of each string to a temporary string and comparing them and still it fails.
I guess there must be some sort of invisible formatting on one of the strings which makes them fail using the = comparison. Is there a better way to compare these that
a) ignores invisible formatting
b) is case sensitive ?

I'm looking at the help files for strcomp but I don't understand exactly how to use it from the examples given.