Urgent Help Required PLEASE (Thanks!) 
Author Message
 Urgent Help Required PLEASE (Thanks!)

Hi,

I recently asked for some help on this topic and was given the following source code. The problem I have is opening a document from a web page button. The document needs to load in the relevant application (ie. Word) - but needs to use an existing copy of the app if it is running else create a new window.

The code below SHOULD do this (according to the VB Scripting guides) - but it doesn't, it always opens new instances of word!

Please help me - it's driving me mad now!

DIM objWord
DIM objDoc

Sub Btn1_onclick()
 On Error Resume Next
  Set objWord = GetObject(,"Word.Application")
 if Err then
  Set objWord = GetObject("","Word.Application")
  err.clear
 End if
 On Error GoTo 0
 objWord.visible = true
 Set objDoc = objWord.Documents.Open("//Server/Share/Manual.doc")
End Sub

Many thanks for all your help,


Systems Administrator
http://www.*-*-*.com/



Fri, 07 Jun 2002 03:00:00 GMT  
 Urgent Help Required PLEASE (Thanks!)

What version of Word are you using? If you're using Word 2000, it will look as though each document has been opened in a separate instance of Word.

Mark

    Hi,

    I recently asked for some help on this topic and was given the following source code. The problem I have is opening a document from a web page button. The document needs to load in the relevant application (ie. Word) - but needs to use an existing copy of the app if it is running else create a new window.

    The code below SHOULD do this (according to the VB Scripting guides) - but it doesn't, it always opens new instances of word!

    Please help me - it's driving me mad now!

    DIM objWord
    DIM objDoc

    Sub Btn1_onclick()
     On Error Resume Next
      Set objWord = GetObject(,"Word.Application")
     if Err then
      Set objWord = GetObject("","Word.Application")
      err.clear
     End if
     On Error GoTo 0
     objWord.visible = true
     Set objDoc = objWord.Documents.Open("//Server/Share/Manual.doc")
    End Sub

    Many thanks for all your help,


    Systems Administrator
    http://www.cddp.co.uk



Fri, 07 Jun 2002 03:00:00 GMT  
 Urgent Help Required PLEASE (Thanks!)

I am currently using Word 97 (Sr1a)

Any ideas?

Mike

  What version of Word are you using? If you're using Word 2000, it will look as though each document has been opened in a separate instance of Word.

  Mark

    Hi,

    I recently asked for some help on this topic and was given the following source code. The problem I have is opening a document from a web page button. The document needs to load in the relevant application (ie. Word) - but needs to use an existing copy of the app if it is running else create a new window.

    The code below SHOULD do this (according to the VB Scripting guides) - but it doesn't, it always opens new instances of word!

    Please help me - it's driving me mad now!

    DIM objWord
    DIM objDoc

    Sub Btn1_onclick()
     On Error Resume Next
      Set objWord = GetObject(,"Word.Application")
     if Err then
      Set objWord = GetObject("","Word.Application")
      err.clear
     End if
     On Error GoTo 0
     objWord.visible = true
     Set objDoc = objWord.Documents.Open("//Server/Share/Manual.doc")
    End Sub

    Many thanks for all your help,


    Systems Administrator
    http://www.cddp.co.uk



Sat, 08 Jun 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Urgent Help Required PLEASE (Thanks!)

2. URGENT: ASP Components from Visual Basic -- Help Required Please

3. PLEASE HELP - MKS MKD etc - Urgent Help Required

4. ADO URGENT HELP REQUIRED PLEASE.

5. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

6. URGENT HELP PLEASE PLEASE PLEASE???

7. HELP - MKS CVS MKD etc - Urgent Help Required

8. CDOSYS help required - Urgent

9. Cookie code in ASP/VBScript required urgent-Help!

10. convert Access 97 to 2K and VB6.0 Urgent help Thanks

11. GRABBER: URGENT: PLS HELP ;) Thank's

12. Please need help with this VB script - Thanks

 

 
Powered by phpBB® Forum Software