leftindent question

  • Thread starter SunshineStateBroker via OfficeKB.com
  • Start date
S

SunshineStateBroker via OfficeKB.com

Right now i have a macro that auto-generates a series of text form input
fields based on a number that a user entered (thank you to those on this
board that assisted in the creation of said macro), i am now running in to
the problem that if the user's input needs more than one line, the text form
field goes all the way back to the left edge of the screen. i tried playing
around with the .LeftIndent command to no avail.

Here is a snippet of my code, can someone assist me in how to force the text
field to indent to the appropriate position on consecutive lines?


.TypeText "Grantor:"
.LeftIndent = InchesToPoints(0.13) '<-- This is where i failed at my attempt.
.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormTextInput
.TypeParagraph
.TypeText "Grantee:"
.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormTextInput
.TypeParagraph
.TypeText "Date Recorded:"
.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormTextInput
.TypeParagraph

Thank you.
 
H

Helmut Weber

Hi,

something along these lines:

Sub Test667()
With selection
.TypeText Text:="Grantor: "
.Paragraphs(1).LeftIndent = InchesToPoints(0.13) '<-- This is where
i failed at my attempt.
.FormFields.Add Range:=selection.Range, Type:=wdFieldFormTextInput
.TypeParagraph
.TypeText Text:="Grantee: "
.FormFields.Add Range:=selection.Range, Type:=wdFieldFormTextInput
.TypeParagraph
.TypeText "Date Recorded: "
.FormFields.Add Range:=selection.Range, Type:=wdFieldFormTextInput
.TypeParagraph
End With
End Sub
--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top