Using Word from a Visual Basic program launched from the web 
Author Message
 Using Word from a Visual Basic program launched from the web

I have a Visual Basic program that is launched from the web and which
launches Word. I can create a file in Word and perform any of the
methods like fileOpen and FileClose, but cannot use statements like
ActiveDocuments and Selection.

'this code works
Set word = CreateObject("Word.Basic")
word.FileOpen("C:\Temp\temp.doc")
word.Insert("Hello")
word.FileClose

'this code does not - it gets lost when it reaches ActiveDocument
Set word = CreateObject("Word.Basic")
word.FileOpen("C:\Temp\temp.doc")
word.Insert("Hello")
ActiveDocument.Tables.Add Range:=myRange, NumRows:=NumberOfRows,
NumColumns:=NumberOfColumns
word.Insert ("Hello again")
word.FileClose

If anyone can give me suggestions on what to use instead of
ActiveDocument or Selection, it will be highly appreciated.

Thanks,
Sonia



Mon, 29 Jan 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Launching external programs from Visual Basic

2. Launching MS-DOS from with in a Visual Basic Program

3. Word Security in Web Browser of Visual Basic

4. Looking for a program that can easily migrate Visual Basic to the Web

5. Web-Browser-Initiated Visual Basic/MS-Access Program

6. How to build a Web based database program in Visual Basic

7. Web Site on Winsock and Visual Basic programming updated

8. Web Site on Winsock and Visual Basic programming

9. Web-Browser-Initiated Visual Basic/MS-Access Program

10. Having a BASIC program launch another program

11. dbase programming(basic) in relation to Visual Basic programming

12. Visual basic programs - connect to a server - Visual Basic 5 Enterprice Edition

 

 
Powered by phpBB® Forum Software