PDA

View Full Version : Solved: Reading from VBA e writing



Paleo
08-22-2006, 03:54 PM
Hi guys,

this is soooo easy with excel but I just dont know how to do this using Word.

I just want to have a UserForm, where I run:


Dont_Know_What = InputBox("Answer here")


Then the text appear mixed up with my other texts on the doc, like:

Suppose I typed: My_Answer

Today is My_Answer that you are gonna hear.

Any clues on how can I do that? Which component do I need to insert in the Word doc? I tried with field but didnt know how to make it work.

mdmackillop
08-22-2006, 05:10 PM
Hi Paleo,
Long time no see. Hope you're keeping well and busy!
You want a Bookmark
Regards
MD

Private Sub CommandButton1_Click()
Selection.GoTo What:=wdGoToBookmark, Name:="MyText"
Selection.TypeText Text:=TextBox1
End Sub

Paleo
08-22-2006, 08:02 PM
Yeap, sorry I am away from here, but I believe I will be able to catch up starting next month. Had many business changes down here, so no time, but now I am getting back.

Your answer was great, worked like a charm, many thanks!

I am being like the Phoenix, ressurgind from ashes, :D.