How can i put a " in the Replace function
-
I am using Replace function to replace the occurance of a double Quote (") in a string. But it shows me error. Can anyone suggest how to achieve that. The code i am using is as given : DocStr = Replace(DocStr, """, "``", 0, , ) Here I want to replace the " with ``. Please Help. Thanks in advance.
Sekhar :)
-
I am using Replace function to replace the occurance of a double Quote (") in a string. But it shows me error. Can anyone suggest how to achieve that. The code i am using is as given : DocStr = Replace(DocStr, """, "``", 0, , ) Here I want to replace the " with ``. Please Help. Thanks in advance.
Sekhar :)
As oppose to using """ try using the character code(34). As """ causes a problem (i presume) as " is part of the syntax syntax. e.g.
docstr = replace(docstr,chrw(34),"``",0,,)
Please check out my articles: The ANZAC's articles
modified on Saturday, January 19, 2008 7:40:16 AM
-
I am using Replace function to replace the occurance of a double Quote (") in a string. But it shows me error. Can anyone suggest how to achieve that. The code i am using is as given : DocStr = Replace(DocStr, """, "``", 0, , ) Here I want to replace the " with ``. Please Help. Thanks in advance.
Sekhar :)
You use double quotation marks to put a quotation mark in a string: DocStr = Replace(DocStr, """", "``", 0, , ) But why are you replacing the quotation marks with something that looks similar to a quotation mark? I seems like you are trying to circumvent some characters because you don't know how to handle them correctly.
Experience is the sum of all the mistakes you have done.
-
You use double quotation marks to put a quotation mark in a string: DocStr = Replace(DocStr, """", "``", 0, , ) But why are you replacing the quotation marks with something that looks similar to a quotation mark? I seems like you are trying to circumvent some characters because you don't know how to handle them correctly.
Experience is the sum of all the mistakes you have done.
-
Yes I want to replace the double quotes from a string that I have retrieved. How can i replace the double quotes from a string using the replace() function. Please Help.
Sekhar :)