Extra spaces getting converted to Unprintable Character in Word 20

A

achilles

I have an Windows application in Windows Vista which sends an email using
Outlook 2007. We can enter the text for the email in a form in the Windows
application.First a word document is prepared using a 2003 word template and
then this document is included in the mail using vb.net (.net 2.0) office
automation.
Now the problem is if there is more than 1 space in the text it appears as �
(Unicode Replacement Glyph) in the outlook word editor and therefore appears
in the mail as well.
Can anybody suggest any solution or at least tell me why this may be
happening?

PS: This application sends an email without any issues in XP(where
automation is done using .Net 1.1 and Office 2003).
 
K

Klaus Linke

achilles said:
I have an Windows application in Windows Vista which sends an email using
Outlook 2007. We can enter the text for the email in a form in the Windows
application.First a word document is prepared using a 2003 word template
and
then this document is included in the mail using vb.net (.net 2.0) office
automation.
Now the problem is if there is more than 1 space in the text it appears as
?
(Unicode Replacement Glyph) in the outlook word editor and therefore
appears
in the mail as well.
Can anybody suggest any solution or at least tell me why this may be
happening?

PS: This application sends an email without any issues in XP(where
automation is done using .Net 1.1 and Office 2003).


Hi archilles,

Does it depend on the font you use?

I suspect the "blanks" might be non-breaking spaces, or another kind of
space character.

In Word, you could select the character, open the VBA editor (Alt+F11),
immediate window (Ctrl+G), and type the line
? Hex(AscW(Selection.Text))
(followed by the Return key)
A non-breaking space would show as "A0", other space characters as 2002,
2003, 2005, ...
These latter Unicode characters might be added by AutoCorrect entries. I'm
not sure how Outlook handles them in mail. They might get replaced by spaces
auomatically when you send the mail anyway, so you could send a mail to
yourself and see if they are still there.

Klaus
 

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