Write into word document

P

prashant

Hi all

I need to write into word document through VB.NET. The data is
supposed to come from the textbox created by me using the com addins.
The text box is appears in the command bar area. The code will pick
the data from textbox & put in the new word document.

i am able to write the data in the new document but not in the same
document

Can anyone of you tell me how to write the content of textboxe in word
document.

Thanks in Advance

Prashant Malik
 
P

Perry

i am able to write the data in the new document but not in the same

With wdApp
..Activedocument.Bookmarks(1).range =
..CommandBars("YourBar").Controls(1).Text
end with

Above lines write from first control (the textbox) from a commandbar to the
first bookmark range
in the activedocument, whereby [wdApp] is a valid Word Application object
variable.
If the above lines are not what y're looking for, kindly repost.
In such case, pls elaborate.

Just out of curiosity:
why do users need to input text in a commandbar textbox and not in a
dialogscreen or the document itself?

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top