PC Review


Reply
Thread Tools Rate Thread

Code to check if word doc is already open

 
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      15th Jun 2007
Could some please shed there intelligence and help with
code to check to see if word document is already open

Private Sub cmdHelp_Click()
Dim objWord As Object
Dim objHelpFileDoc As Object

Set objWord = CreateObject("Word.Application")

objWord.Visible = True

Set objHelpFileDoc = objWord.Documents.Open _
("C:\Mid-Carolina Import Wizard\Help Files\InvoiceCreatorHelp.doc")

End Sub
Thanks Mike
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      15th Jun 2007

http://support.microsoft.com?kbid=138621
XL: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=291295
XL2002: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=213383
XL2000: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=184982
WD97: VBA Function to Check If File or Document Is Open

--
regards,
Tom Ogilvy


"Mike" wrote:

> Could some please shed there intelligence and help with
> code to check to see if word document is already open
>
> Private Sub cmdHelp_Click()
> Dim objWord As Object
> Dim objHelpFileDoc As Object
>
> Set objWord = CreateObject("Word.Application")
>
> objWord.Visible = True
>
> Set objHelpFileDoc = objWord.Documents.Open _
> ("C:\Mid-Carolina Import Wizard\Help Files\InvoiceCreatorHelp.doc")
>
> End Sub
> Thanks Mike

 
Reply With Quote
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      15th Jun 2007
Thanks Tom

"Tom Ogilvy" wrote:

>
> http://support.microsoft.com?kbid=138621
> XL: Macro Code to Check Whether a File Is Already Open
>
> http://support.microsoft.com?kbid=291295
> XL2002: Macro Code to Check Whether a File Is Already Open
>
> http://support.microsoft.com?kbid=213383
> XL2000: Macro Code to Check Whether a File Is Already Open
>
> http://support.microsoft.com?kbid=184982
> WD97: VBA Function to Check If File or Document Is Open
>
> --
> regards,
> Tom Ogilvy
>
>
> "Mike" wrote:
>
> > Could some please shed there intelligence and help with
> > code to check to see if word document is already open
> >
> > Private Sub cmdHelp_Click()
> > Dim objWord As Object
> > Dim objHelpFileDoc As Object
> >
> > Set objWord = CreateObject("Word.Application")
> >
> > objWord.Visible = True
> >
> > Set objHelpFileDoc = objWord.Documents.Open _
> > ("C:\Mid-Carolina Import Wizard\Help Files\InvoiceCreatorHelp.doc")
> >
> > End Sub
> > Thanks Mike

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need VBA Code to check if MSOutlook is open TPJoseph Microsoft Excel Programming 4 7th Jul 2009 03:30 PM
Fix code - check to see if a workbook is open, if so, save changes then close. J.W. Aldridge Microsoft Excel Programming 6 13th Oct 2007 07:22 PM
VBA code to check if another window is open? =?Utf-8?B?andlYXNs?= Microsoft Excel Programming 3 1st Mar 2006 05:30 PM
VB code to check if a file is open Michael Microsoft Access Form Coding 1 26th Feb 2004 05:00 PM
Need Code to check to see If Form is Open and if so Then Close it Dave Elliott Microsoft Access Forms 4 29th Jan 2004 05:46 AM


Features
 

Advertising
 

Newsgroups
 


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