|
-
Aug 19th, 2000, 08:07 AM
#1
Thread Starter
New Member
I have built an application and tried to launch Word using:
_________________________________
Public Sub Send_Word()
Dim hWord As Long
Dim Appword As Word.Application
Dim refstr As String
On Error Resume Next
'I have declared previously this function
hWord = FindWindow("OpusApp", 0& )
If hWord = 0 Then
Set Appword = CreateObject("Word.Application")
End If
With Appword
If .Documents.Count = 0 Then
.Documents.Add
End If
End With
referstr = txtAuthors.Text
Appword.Documents(1).Range.InsertAfter referstr & _
vbCrLf
Appword.Visible = True
End Sub
________________________________________________
While it works fine in my computer (Win 98, Word 2000), it does not work in other computers (e.g. Win 95, Word 97)where the application was installed.
I have put a reference to "Microsoft Word 9.0 Object Library".
Is it possible that there is a problem with this library or what else?
Please Help.
THANKS in advance
emmzou
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
|