Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to place info from VBA form into Word ????

Status
Not open for further replies.

MrsTFB

MIS
Oct 3, 2000
307
US
I have worked alot with Excel in allowing user to enter information into text boxes on a form and placing that data onto a spreadsheet.

Example:
Range("A2").value = Textbox1.text


Now I need to place information from form into certain areas in a Word document. How is this done. I tried to assign names to the particular area and I also tried inserting an Excel spreadsheet (I only have 4 entries). Neither of these worked, at least not the way I did it.

NEED HELP!

Thanks in advance,

Bsimm [sig][/sig]
 
Assuming you are using named fields you can use the SetFormResult method.

WordBasic.SetFormResult sFieldName, Textbox1.Text

[sig][/sig]
 
I don't guess I know enough to use that answer. I tried putting that code into the userform Initialize section. Also in the textbox1 section with the name of the fields on the worksheet. I apologize for not being able to figure more out on my own.

Thanks for any help given.

Bsimm
[sig][/sig]
 
First, bsimm, are you aware that you can do calculations in Word? Secondly, did you try copying the cell and pasting it to Word using Edit-Paste special-Excel object and make sure &quot;paste link&quot; is selected? [sig]<p> <br><a href=mailto:techsupportgirl@home.com>techsupportgirl@home.com</a><br><a href= </a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top