Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word formatting problem

Status
Not open for further replies.
Jun 24, 2004
23
US
This is somewhat odd. I have a .CSV file that was sent to me by a vendor and before I can pull it into Excel and upload it into SQL using a DTS package, I have to change the file location references (there are about 12,671 of them) from href='XXXXXX/article.name' to href='ra_content/article.name'.

The only reasonably way to do this is a Find & Replace on href='XXXXXX and replace it with href='ra_content.

The problem is that when I do that Find & Replace, it changes the single quote to an apostrophe and that makes it impossible for the system to read the ' ' that frames the path. So now I have a large body of very nice content and no screen shots because the path statement is a mess.

I have tried doing a Find & Replace in Word, but it does not actually fix the single quote. I know this because if I highlight a single quote I have changed, alter it, and then hit the Undo icon, it undoes is to the correct format, which it was not in when i had supposedly corrected it.

Notepad just crashes when I try it there and Excel also can't do it.

This single quote problem is killing 12,671 pieces of visual content from showing up in my knowledgebase. Does anyone have an idea????

Chris Wright
Constellation Energy
Baltimore

 
Chris,

Have you tried just doing a Find/Replace on the XXXXXX part, rather than including the href = '

If you are not replacing the single quote, surely it should be okay!

Phil H.
 
Good point. Ouch.

I hope I find a fix and do not have to redo it from scratch. I am working on a smaller copy of the file and doing Find&Replace in Notepad. Very slow, but quicker than redoing it completely.

However, if I am forced to redo it, I will try this.
 
Have you tried, within Word, to turn off the use of Smart Quotes (curly quotes)?

Open the .csv file into Word
Click Tools
Select AutoCorrect Options
On the AutoFormat tab, de-select Straight Quotes with Smart Quotes
Do the same thing on the AutoFormat as you Type tab.
OK out of those windows, then try doing the Find and Replace with those options turned off and see if that works for you now.

 

It is the AutoFormat As You Type option that is causing this.

If you already have curly quotes and want to change them to straight ones ...

Turn OFF (i.e. Uncheck) the Smart quotes option in AutoFormat as you type.
Find and Replace All ' with ' (that is enter a single quote in each of the Find what and Replace with boxes)

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Thank you all, that was exactly it. <Grumbles about wanting WP 5.1 back.>

Cheers,
Chris
 
<Grumbles about wanting WP 5.1 back.>

[cry]sometimes, don't we all........

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top