Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Business Applications
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop drivers dvd email error excel excel 2003 firefox hard drive hardware hdmi hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem recovery router safe mode screen slow sound spyware tdlwsp.dll trojan vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Business Applications >
Word VBA - Multiline text box & indentation

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
mshanks's Avatar
Junior Member with 2 posts.
 
Join Date: Aug 2009
26-Aug-2009, 06:13 AM #1
Word VBA - Multiline text box & indentation
Hello all,

I've set up a UserForm on a template - the user has to enter a variety of bits of information - one part of which is CCs.

I've put in a text box (with multiline available), and have a bookmark at the end of the document for where I want it to go.

Currently I have;

Code:
If doc_CC.TextLength > 0 Then .Bookmarks("CCs").Range.Text = vbCr + "CC: " + Chr(9) + doc_CC + vbCr
When I wrote it I expected it to behave how it does if done manually - if you tab, write some text, then hit enter, you move to the next line with the same level of indentation.

However, with the above code, it tabs correctly for the first line, but then returns to the left margin for all following lines.

Any one have any ideas how to work around this?

Any advice/suggestions are greatly appreciated.
Closed Thread Bookmark and Share

Tags
office, vba, word

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 01:32 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.