Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Making fileds line up on a Word doc using Visual Basic Editor

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
trezraven - 25 Jan 2007 20:13 GMT
Hi everyone!  I am new so I hope I am posting my question in the right
place.  I have created a form in Office 2007 using Visual Basic Editor.
I am trying to make two lines line up regardless of the number of
characters before the fields.  Example:
JOHN DOE                                              Case No
:1D00-0000

v.                                                             Lower
Tribunal Case No : 00-0000

JANE DOE

I always want the Case No and Lower Tribunal Case No fields to line up.
I have tried creating a bookmark, but that was not successful.  Maybe I
am doing it wrong.  To be more specific.  The location on my paper for
Case No is line 9 and according to the gridlines it starts in gridbox
19 and the location for Lower Tribunal is line 12 and gridbox 19.
Unfortunately, what seems to happen is the Case No is shifted according
to the number of characters in the appellant's name.  I have tried
creating custom tabs and that has not worked either.

Here is a piece of the code I used to set up the tabs.

.TypeText Text:=txtAppellant.Value
 .Font.AllCaps = False
 .TypeText Text:=vbTab & vbTab & vbTab & _
    "Case No : " & txtCaseNumber.Value & _
    vbCrLf & vbCrLf & vbCrLf & _
    "v." & _
    vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & _
    "Lower Tribunal Case No : " & _
    txtLowerTrib.Value & _
    vbCrLf & vbCrLf
    .Font.AllCaps = True
    .TypeText Text:=txtAppellee.Value
    .Font.AllCaps = False

Any assistance will be greatly appreciated.
Susan - 25 Jan 2007 20:50 GMT
tabs or spaces won't work because you never know how long
"john doe" will be
you need to make a table & insert the bookmarks in the
proper place inside the table.  that will keep things aligned.
susan

> Hi everyone!  I am new so I hope I am posting my question in the right
> place.  I have created a form in Office 2007 using Visual Basic Editor.
[quoted text clipped - 34 lines]
>
> Any assistance will be greatly appreciated.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.