简体   繁体   中英

How to open a file on my Sharepoint Site with VBA if I dont have internet connection?

I have a macro that opens a file on a Sharepoint Site, uses that file to generate a new file to be saved into the same Sharepoint Site. If I am currently connected to the Internet, the macro runs perfectly fine. When I am disconected from the internet the macro is unable to open the file, even if I am referencing a path to my local Drive. For example

Set wdApp = New Word.Application
'make word Visible'
wdApp.Visible = True
wdApp.Activate
'open File'
wdApp.Documents.Open (D:\mySharepointSite\file.dotx")

Everything on Sharepoint is stored in "The Cloud" which is (roughly) a fancy name for "The Internet". If you aren't connected to the internet you can't connect to sharepoint.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM