LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Open Word file with Excel VBA

Hi,

I want to open a Word file using an Excel macro, but it doesn't work as I
want.
I get the message: This file is locked for editing by another user....."
It must have something to do with the macro, because the file is not locked
or already open.
How can I avoid this message?

Dim wdApp As Object
Dim wdDoc As Object
Set wdApp = CreateObject("Word.application")
wdApp.Visible = True
Set wdDoc = wdApp.Documents.Open _
(Filename:="C:\Documents and Settings\XXX\Desktop\test.doc")

Regards
Kaj Pedersen


 
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
Open new Word file via Excel Lupe Excel Programming 3 September 5th 07 06:26 AM
open word from excel...file does not exist error tbaam Excel Programming 9 January 16th 07 03:34 PM
Using an Excel macro to open a Word File lhyer Excel Programming 4 July 18th 05 09:28 PM
Open One Word File from Excel Stratuser Excel Programming 6 January 27th 04 06:37 PM
Graph Excel Selection, Open Word File, Embed Graph Into Word Steve Excel Programming 0 November 17th 03 05:35 PM


All times are GMT +1. The time now is 09:41 PM.

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"