Thanks for looking
I work with Excel a lot and have built an array of string values, there are
about 200 in the test. I am trying to output these to word using code found
here, I'm getting no errors but nothing is happening either. Thanks for any
help and the code is below
Set owordapp = CreateObject("Word.Application")
'open a new document in Word
owordapp.Documents.Add DocumentType:=wdNewBlankDocument
owordapp.Visible = True
storeIndex = 1
'===THIS IS THE PROBLEM==========
Do Until storeArray(storeIndex, 16) = ""
activedocument.Range.insertafter storeArray(storeIndex, 16) & vbCrLf
activedocument.Range.insertafter storeArray(storeIndex, 17) & vbCrLf
storeIndex = storeIndex + 1
Loop
Probably something easy but I'm lost in Word

Signature
-John
Please rate when your question is answered to help us and others know what
is helpful.
John Bundy - 19 Jul 2007 15:10 GMT
Found some help that worked from Excel side, for those looking this is what I
did
Set owordapp = CreateObject("Word.Application")
'open a new document in Word
owordapp.Documents.Add DocumentType:=0
owordapp.Visible = True
storeIndex = 1
Do Until storeArray(storeIndex, 16) = ""
owordapp.Selection.TypeText storeArray(storeIndex, 16) & vbCrLf
storeIndex = storeIndex + 1
Loop

Signature
-John
Please rate when your question is answered to help us and others know what
is helpful.
> Thanks for looking
>
[quoted text clipped - 18 lines]
>
> Probably something easy but I'm lost in Word