P
pgoodale
How do I open a word file from excel. I have a vast amount of
information which I want to link to word documents which are all kept
in the same folder. However, there are too many of these links so I
can't just create hyperlinks. Instead I need a code to select the file
once the certain cell is selected. The word files are all the same with
the exception of a number, i.e. WORD001, WORD002, WORD003, etc. I have
come up with this which selects the cell as a target. What is the code
which will open the word document.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Left(Target, 3) = "BOM" Then
Open ("S:\Technical Support\ then the wordname. in this
example, it will be target.
MsgBox Target
End If
Will this code work? What is the open command? Any help is appreciated.
Thanks.
information which I want to link to word documents which are all kept
in the same folder. However, there are too many of these links so I
can't just create hyperlinks. Instead I need a code to select the file
once the certain cell is selected. The word files are all the same with
the exception of a number, i.e. WORD001, WORD002, WORD003, etc. I have
come up with this which selects the cell as a target. What is the code
which will open the word document.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Left(Target, 3) = "BOM" Then
Open ("S:\Technical Support\ then the wordname. in this
example, it will be target.
MsgBox Target
End If
Will this code work? What is the open command? Any help is appreciated.
Thanks.