locked
VBA: FileDialog changes the initialfilename address to http. Can this be stopped? RRS feed

  • Question

  • I am writing a script for an internal Word application to allow users to multi-select documents from our SharePoint Library.  I form the URL as file:\\<servername>\<foldername>\ but when I pass that to the filedialog.initialfilename parameter, it changes it to http://<servername>/<foldername> and so multi-select doesn't work. 

    Has anyone seen this before and know how to either change the explorer used by the filedialog process, or stop the filename being changed? 

    I have read that webDAV may be involved, but I just haven't figured out how to work around this problem.  Does anyone have an answer? 

    Many thanks

    Lloyd

    Friday, February 23, 2018 1:22 PM

All replies

  • Hi Lloyd,

    >> I form the URL as file:\\<servername>\<foldername>\ but when I pass that to the filedialog.initialfilename parameter, it changes it to http://<servername>/<foldername> and so multi-select doesn't work.

    Could you share us complete steps to reproduce your issue?

    It seems you want to select SharePoint library documents, why the URLs are file:\\?

    Could you open the dialog manually? If you could, can you set the file path to file:\\?

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, February 27, 2018 5:17 AM