簡體   English   中英

以編程方式創建的目錄未顯示,並且未打開Word文件

[英]Programmatically created directory not showing and word file inside not openning

我有一個桌面應用程序,我在啟動路徑的新目錄中創建了一個Word文檔。

string origFileName = Application.StartupPath + "\\Declerations\\file.docx";
string newName = "@'"+origFileName+"'" ;
System.Diagnostics.Process.Start ( newName );

我也有一個安裝盾牌安裝項目。 創建設置並安裝系統並運行應用程序后,以上代碼無法打開word文檔。 Word應用程序正在運行,但是會顯示一條消息,指出“目錄名稱無效”。 我檢查了目錄和文件是否使用File.Exists創建並存在。 但是目錄和文件都沒有顯示在Programfiles執行路徑中。 creted目錄不顯示並且文件未運行是什么問題?

海蘭

您嘗試過嗎?:

string origFileName = Application.StartupPath + @"\Declerations\file.docx";

System.Diagnostics.Process.Start ( origFileName );

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM