Dean R
(Starting to like KiXtart)
2002-04-05 05:53 PM
An easy one

How do I put two sets of inverted commas in a writevalue line?
eg
WriteValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\9.0\Excel\Options","OPEN",""C:\Vision5\Vision5.xla"","REG_MULTI_SZ")

As you can see the ""C:\Vision5\Vision5.xla"" is going to stuff me up because Kix is going to assume the next " after the first is the end of the entry. And the OPEN value has to have ""C:\Vision5\Vision5.xla"" as the entry, "C:\Vision5\Vision5.xla" will not work.

Any ideas?

[ 05 April 2002, 17:56: Message edited by: Dean R ]


Sealeopard
(KiX Master)
2002-04-05 06:00 PM
Re: An easy one

Use single quotes to encapsulate strings or double a double quote in a string (that one is messy)
code:
' pretty clean
WriteValue('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\9.0\Excel\Options','OPEN','"C:\Vision5\Vision5.xla"','REG_MULTI_SZ')
' pretty messy
WriteValue("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\9.0\Excel\Options","OPEN","""C:\Vision5\Vision5.xla""","REG_MULTI_SZ")



[ 05 April 2002, 18:01: Message edited by: sealeopard ]


Dean R
(Starting to like KiXtart)
2002-04-05 06:03 PM
Re: An easy one

Cheers Mate