Can someone help me to fix this? I am getting Error in expression with the following code. The quotations around "%1" must be included. Thanks in advance RegWrite("HKCR\Word.document.8\shell\Open\command", "", "REG_SZ", "C:\Program Files\Microsoft Office\Office10\WINWORD.EXE" "%1")