How to open a word file from SharePoint ?

GONZALEZ ANIDO Manuel 0 Reputation points
2023-07-11T13:34:22.83+00:00

I created a Macro with the following code. The problem here is that a window opens but whatever docx file I click nothing happens. If I go to that SharePoint page I can open, that Word document without any problem.

I tried to apply this Macro to excel and other office apps and still the same. An explorer window appears but nothing open, whatever I select. Any idea what might be wrong in this code?

With Application.FileDialog(msoFileDialogOpen)

.InitialFileName = "https://acp4eu035hotmail.sharepoint.com/xxxxx/xxxxx/xxxxxx/"

.AllowMultiSelect = False

.Show

For Each vrtSelectedItem In .SelectedItems

Debug.Print vrtSelectedItem ' adjust this to do whatever you need

Next

End With

Word
Word
A family of Microsoft word processing software products for creating web, email, and print documents.
923 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,158 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.