Take a look at my code and tell me what is wrong with this

  • Thread starter Thread starter yl358
  • Start date Start date
Y

yl358

I have many word documents (all with the same template), and I am tryin
to extract the info from all the .doc files and compile them into on
Excel database. I have the code done and it works.... but I ran int
one problem: The resulting String values in Excel have weird squar
symbols in them.

Take a look at it in the attachments. I've attached both the .do
template and a general database as a reference.

Please fix my problem: how do I get rid of these square symbols

+-------------------------------------------------------------------
|Filename: POV_HELP.doc
|Download: http://www.excelforum.com/attachment.php?postid=5142
+-------------------------------------------------------------------
 
More than likely they are chr(10) or chr(13) or both. Check for each
characters ASC value.

ChasAA
 
Try running this and see if they go away:

Sub ReplaceLittleSquares()
Cells.Replace What:=Chr(10), _
Replacement:="", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
Cells.Replace What:=Chr(13), _
Replacement:="", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
End Sub
 

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

Back
Top