Word command-line-arguments space issues

前端 未结 1 1608
庸人自扰
庸人自扰 2021-01-21 03:40

I want to pass parameters to winword in order to read it in my vsto addin by using Environment.GetCommandLineArgs().

If a parameter-value contains a space I\'m not able

1条回答
  •  臣服心动
    2021-01-21 04:06

    Try with the following command :

    winword.exe "/myVar1:C:\folder with space\whatever1.doc" "/myVar2:C:\folder with space 2\somethingelese.txt" C:\example.doc
    

    If it still doesn't work, send us the content of the array returned by GetCommandLineArgs.

    0 讨论(0)
提交回复
热议问题