Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 194
Default Word doc opens, but not in visible window?

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Word doc opens, but not in visible window?


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



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ed" wrote in message ...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 194
Default Word doc opens, but not in visible window?

Beautiful, Ron! Thank you!

Ed

"Ron de Bruin" wrote in message
...

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



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ed" wrote in message

...
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Office XP: Excel only opens in one window. OfficeXPUser Excel Discussion (Misc queries) 5 October 13th 08 04:17 AM
replace always opens a window Meinarsson Excel Worksheet Functions 1 August 23rd 08 01:55 AM
The window opens in a smaller window not full sized window. Rachael Excel Discussion (Misc queries) 0 November 7th 06 09:04 PM
Excel file opens but no worksheets visible SELIGMAN MAINE Excel Discussion (Misc queries) 3 July 5th 06 10:32 PM
Help window opens minimized Dick L Excel Discussion (Misc queries) 0 September 22nd 05 12:07 AM


All times are GMT +1. The time now is 02:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"