更改vb.net资源

时间:2013-12-04 13:23:58

标签: vb.net vb.net-2010

我正在使用vb.net程序,该程序具有与之关联的Microsoft Word帮助文档。我已用更新的帮助文件替换了文档,但文档不会更改。当我单击应该调用文档的帮助按钮时,它会打开旧文档,即使我用新文件替换了资源文件中的旧文件。这是什么原因?

附加说明:当我将应用程序发布到服务器时,旧的帮助manuel会显示,但如果我只是将它发布到我正在处理的计算机上并启动它,则会显示新的帮助manuel。

如果需要更多信息,请告诉我。

PRBL_121220_SWL_Tracker是帮助文件的名称。

Imports Word = Microsoft.Office.Interop.Word
'create temporary folders and files to simulate the environment needed to create report
Module Help
    Sub Build_Help()
        Dim wordApp As New Word.Application
        Dim wordDoc As Word.Document
        Dim helpFile As String
        Dim exlFile As String
        Dim helpFolder As String
        helpFolder = System.IO.Path.GetTempPath
        helpFolder = helpFolder & "swltemp"
        My.Computer.FileSystem.CreateDirectory(helpFolder & "\F025-14-03-410_PVLc")
        helpFile = helpFolder & "\130820.help.doc"
        System.IO.File.WriteAllBytes(helpFile, My.Resources.PRBL_121220_SWL_Tracker)
        wordDoc = wordApp.Documents.Open(helpFile)
        wordApp.Visible = 1


        exlFile = helpFolder & "\F025-14-03-410_PVLc\LIST_130709_F25_PVLc_SAP_BOMs.xlsx"
        System.IO.File.WriteAllBytes(exlFile, My.Resources.LIST_130709_F25_PVLc_SAP_BOMs)
        exlFile = helpFolder & "\F025-14-03-410_PVLc\REP_20130611_Matrix_F025-14-03-xxx_.xlsx"
        System.IO.File.WriteAllBytes(exlFile, My.Resources.LIST_130709_F25_PVLc_SAP_BOMs)
        exlFile = helpFolder & "\F025-14-03-410_PVLc\SAb_F025-14-03-410_4_k.xls"
        System.IO.File.WriteAllBytes(exlFile, My.Resources.SAb_F025_14_03_410_4_k)


        exlFile = helpFolder & "\REP_130709_F25_PVLc_SAP_B_SWLTest.xlsm"
        System.IO.File.WriteAllBytes(exlFile, My.Resources.REP_130712_F25_PVLc_SAP_B_SWLTest)
        wordDoc.Hyperlinks(1).Address = helpFolder & "\F025-14-03-410_PVLc"
        wordDoc.Hyperlinks(2).Address = exlFile
        wordDoc.Save()
        wordDoc = Nothing
        wordApp = Nothing
    End Sub
End Module

0 个答案:

没有答案