|
-
Jun 24th, 2005, 07:33 AM
#1
Thread Starter
New Member
Exporting VB Text to word
I have a program in word written in the VB editor in it. I have a bunch of text boxes and values that I would like to print out in the word doc.
I'm sure it's pretty simple, but I'm kinda new to this, I have done VB stuff before. How would I get it to print out the text box of what someone enters?
Thanks
-
Jun 24th, 2005, 07:40 AM
#2
Re: Exporting VB Text to word
you can either put the values from the textboxes into a word document, then print that, or print them straight to the printer
printer.print textbox1, textbox2...............
printer.enddoc to tell it thats all and print the page
of course there is much more to it than that if yu want to position it on the page or anything
pete
-
Jun 24th, 2005, 07:43 AM
#3
Thread Starter
New Member
Re: Exporting VB Text to word
I don't want to print anything.
Add on: I found that if I do ThisDocument.Range.Text = "Hello" & ThisDocument.Range.Text
It screwes up the entire formatting of the doc.
I need to be able to just add 1 page of the VB information to the first of this doc without screwing it all up.
-
Jun 24th, 2005, 08:01 AM
#4
Re: Exporting VB Text to word
you want to add it at the beginning of the document?
maybe you could add a sectionbreak after the vb information
what code do you have so far?
pete
-
Jun 24th, 2005, 08:14 AM
#5
Thread Starter
New Member
Re: Exporting VB Text to word
I don't really have anything. I have a bunch of forms with text boxes or option boxes and such. Basically the program will do this. Opens up, user enters some info, hits enter, goes to the next form, does it again, and so on and so forth.
So now have textbox1's value is what they entered. I want to be able to spit that out into a word doc.
So be like this
Their Information
Their Information
Their Information
Then
Static Form that is the same for everyone
The problem is if I do ThisDocument.Range.Text = "Hello" & ThisDocument.Range.Text
I screw up the formating of the stuff already in the doc.
-
Jun 24th, 2005, 08:16 AM
#6
Thread Starter
New Member
Re: Exporting VB Text to word
How do I add a carridge return to have VB do that for word?
-
Jun 24th, 2005, 08:56 AM
#7
Re: Exporting VB Text to word
textbox1 & vbnewline & textbox2
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|