hi,
can any one plz tell me how to add text in ms word from vb?? [using same vb macro commands as our word macro produces….]
m trying to add text in a word document from VB, initializing the doc is error free, but when i try to use “b” (selection object) the error appears… below is my code…
——————————————
Dim a As New Word.Document
Dim b As Word.Selection
— or — Set b = Word.Selection
b.TypeText “asdf”
[Error: object variable or with block not set]
a.SaveAs (“c:\2.doc”)
———————————————–
wat to do now??
(this code is of form’s load event)…
the reference of ms word is also added in project references….