Hello,
I am trying to open certain Word documents using the macro below, but it doesn't seem to be working. When I run the macro, I am not getting any error.
In the selected area, each line has a network drive link to a word file in the following format: K:\Sales\John\Sept\Notes\J2021.docx
Why is the macro not working?
I am trying to open certain Word documents using the macro below, but it doesn't seem to be working. When I run the macro, I am not getting any error.
In the selected area, each line has a network drive link to a word file in the following format: K:\Sales\John\Sept\Notes\J2021.docx
Why is the macro not working?
VBA Code:
Dim openfile As Document
Dim singleLine As Paragraph
Dim lineText As String
For Each singleLine In Selection.Paragraphs
lineText = singleLine.Range.Text
Set openfile = Word.Documents.Open(lineText)
Next singleLine