我用 VB 開啟WORD檔<br>如果該 WORD 檔被某人開啟<br>會出現訊息並詢問要用「唯讀」...等方式來開啟<br>我想要預設用「唯讀」方式開啟,但是不想讓這訊息跑出來<br>該如何寫?!
出處http://www.vbqa.com/discuss/vb.old/read.asp?id=6857 Dim wrd As Word.Application Set wrd = CreateObject("Word.Application") With wrd .Visible = True .WindowState = wdWindowStateMaximize .Documents.Open FileName:=filepath, ReadOnly:=True, PasswordDocument:=password 'password 是指文件密碼 End With Set wrd = Nothing
VB 不支援指名引數,這是 VBA 語法...