Word doc opens, but not in visible window?

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

I use these lines
Doc = Fpath & "\" & Fname & ".doc"
Set WordDoc = Word.Documents.Open(Doc)
to open a Word doc so more code can copy a selection and paste it into my
workbook. I never see the doc in a visible window, but the information does
get copied and pasted, so I know it is getting the doc. Now, what do I need
to ad to see the doc? I tried Visible = , but my choices were xlVisible,
xlHidden, and xlVeryHidden, which don't apply to Word docs.

Ed
 
Try this Ed


Dim WD As Object
Dim doc As String
Doc = Fpath & "\" & Fname & ".doc"
Set WD = CreateObject("Word.Application")
WD.Documents.Open doc
WD.Visible = True
 
Beautiful, Ron! Thank you!

Ed

Ron de Bruin said:
Try this Ed


Dim WD As Object
Dim doc As String
Doc = Fpath & "\" & Fname & ".doc"
Set WD = CreateObject("Word.Application")
WD.Documents.Open doc
WD.Visible = True
 
Back
Top