View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Juan Pablo González Juan Pablo González is offline
external usenet poster
 
Posts: 226
Default Another Late Binding Question

I think this line

wrd.Visible

should be

wrd.Visible = True

or in which line are you getting the error ?

--
Regards

Juan Pablo González

"luvgreen" wrote in message
...
Hi, All,

I read through the late binding related posts, but it still did not

resolve my problem. I tried this code in excel XP. I got this error "Run
time error 5863 Application-defined or object-defined error". Please explain
why and what I should do. Thanks much.

Sub Try()
Dim wrd As Object
Dim doc As Object
Set wrd = CreateObject("Word.Application")
wrd.Visible
Set doc = wrd.Documents.Add
doc.Content = "to be or not"
doc.Save
End Sub