来自Word command-line-arguments space issues的问题似乎是一个特定的winword.exe问题。
http://msdn.microsoft.com/de-de/library/system.environment.getcommandlineargs%28v=VS.90%29.aspx说:MyApp.exe“alpha with spaces”“beta with spaces”==> MyApp.exe,带空格的alpha,带空格的beta
对于winword.exe,情况并非如此。
winword.exe /alpha:1 /beta:2 ==> OK
winword.exe "/alpha:1 space" "/beta:2" ==> beta is missing?!
winword.exe /alpha:"1 space" "/beta:2" ==> beta is missing?!
这真的很奇怪......我无法传递多个包含空格的参数 任何想法?