Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

At endofline go to

Hi i have created a userform in VBA for Microsoft Word that allows the user to type text into a TextBox and then press a command button and it is dumped into Word at a bookmark.  I was just wondering if you could have it so when it is put into the active document it has double line spacing.  I could probably do that but the problem is that I need to use the space between the lines for typing in text at a later stage.  The closest i got to a solution (and i dont know if this is possible) was to have it when it reaches the end of the line it goes to line+2.  If that makes sense.

I can explain it in more detail if need be.

thanks caz.
0
caz1805
Asked:
caz1805
  • 3
  • 2
1 Solution
 
yesplease151Commented:
In your code, when you dump the text, add the following:  & vbcrlf

the vbcrlf is a Carraige Return Line Feed.  It will give you a new line.
0
 
caz1805Author Commented:
Thanks alot, but will that put a blank line under EACH line that is printed?
0
 
Carl TawnSystems and Integration DeveloperCommented:
For that you just add vbCrLf twice:

    & vbCrLf & vbCrLf
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
yesplease151Commented:
Yes, it will put a balnk line under each line.
0
 
caz1805Author Commented:
thanks alot guys, been great.
0
 
caz1805Author Commented:
I can get it working normally but I cant figure out how to add it to a bookmakr, below is the line of code i want to add it to, how would i do it?

ActiveDocument.Bookmarks("test1").Range.Text = TextBox1.Value
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now