The code below opens Word docs using file paths in each cell in Excel range.
Code works to open the docs OK, but the issue is that it will also maximize one unrelated, already open Word doc (if it exists) that is minimized to the tool bar.
Is there a way to avoid this?
Dim Shex As Object
Set Shex = CreateObject("Shell.Application")
Dim rng As Range
Dim ws As Worksheet
Set ws = Worksheets("FilePaths")
NumRows = Range("B2", Range("B1").End(xlDown)).Rows.Count
Set rng = ws.Range("B2:B" & NumRows + 1)
For Each cell In rng
Shex.Open cell.Value
Next cell
End Sub