|
-
Oct 20th, 2006, 02:34 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Open word and close word document late bound
Hi,
How do I open and close a word document late bound style in vb6.0.
with error checking.
Cheers,
-
Oct 20th, 2006, 03:00 PM
#2
Re: Open word and close word document late bound
Something like this:
VB Code:
Dim oWord As Object, oDoc As Object
On Error Resume Next
Set oWord = CreateObject("Word.Application") 'Open Word.
If Err.Number <> 0 Then
Debug.Print "Problem opening Word."
Exit Sub
Else
Set oDoc = oWord.documents.Open("D:\word.doc") 'Open a document.
If Err.Number <> 0 Then
Debug.Print "Problem opening document."
Else
'Work with document.
oDoc.Close 'Close the document.
oWord.Quit 'Quit the application.
End If
End If
-
Oct 20th, 2006, 03:30 PM
#3
Thread Starter
Hyperactive Member
Re: Open word and close word document late bound
Cheers expert Comitern!!!!!!Hey any ideas with my line up table of two table posts! The idea after achieving the line up with each table is:-
via if formulas match each field with each table but 1st I need to sort out the line up rountine.
Cheers buddy!
Last edited by gphillips; Oct 20th, 2006 at 03:33 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|