The server opens Word

xiaoxiao2021-03-06  63

Method 1% str = "Hello World"

Set objWordApp = Server.createObject ("word.application") objwordapp.visible = true

Set objWordDoc = objWordApp.Documents.Open ( "e: /mydoc.doc") objWordApp.Selection.TypeText (str) objWordDoc.content.Font.Name = "Arial" objWordApp.Application.Activate () objWordApp.ActiveDocument.SaveAs ( "e: /mydoc1.doc") Objwordapp.quitset objworddoc = NothingSet ObjwordApp = Nothing%> Method 2 <% set obj = getObject ("e: /mydoc.doc", "word.document.8") obj.application. Visible = true set obj = Nothing%>

转载请注明原文地址:https://www.9cbs.com/read-111095.html

New Post(0)