WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Formatting list with "bullets"

 
   Home -> Office -> User Forms RSS
Next:  Outlook 2003 won't work ?  
Author Message
Abel MacAdam

External


Since: Dec 17, 2007
Posts: 10



(Msg. 1) Posted: Wed Mar 18, 2009 6:10 am
Post subject: Formatting list with "bullets"
Archived from groups: microsoft>public>word>vba>userforms (more info?)

Hi,

In a text field of my form I have put a list of lines. Each line starts with
a letter and a bracket, like
a) this is the first line
b) this is the second line
c) this is the third line

When I run my form this text comes out in my for as
-a) this is the first line
--b) this is the second line
--c) this is the third line
(where a - stands for a space. So the second and following lines have two
spaces instead of one)

Does anyone know how I can handle this? At the moment I can click in the
field in the document and remove the extra spaces. But I know that I have to
do that. My unwary users might forget to do it.

Abel
Back to top
Login to vote
Doug Robbins - Word MVP o

External


Since: Feb 23, 2009
Posts: 25



(Msg. 2) Posted: Wed Mar 18, 2009 7:05 pm
Post subject: Re: Formatting list with "bullets" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Show us the code that you are using to transfer the data from the form into
the document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Abel MacAdam" <AbelMacAdam.TakeThisOut@discussions.microsoft.com> wrote in message
news:C094F83F-AE7F-4614-8A82-B802998A09ED@microsoft.com...
> Hi,
>
> In a text field of my form I have put a list of lines. Each line starts
> with
> a letter and a bracket, like
> a) this is the first line
> b) this is the second line
> c) this is the third line
>
> When I run my form this text comes out in my for as
> -a) this is the first line
> --b) this is the second line
> --c) this is the third line
> (where a - stands for a space. So the second and following lines have two
> spaces instead of one)
>
> Does anyone know how I can handle this? At the moment I can click in the
> field in the document and remove the extra spaces. But I know that I have
> to
> do that. My unwary users might forget to do it.
>
> Abel
Back to top
Login to vote
Abel MacAdam

External


Since: Dec 17, 2007
Posts: 10



(Msg. 3) Posted: Thu Mar 19, 2009 3:13 am
Post subject: Re: Formatting list with "bullets" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Doug,

This is something you helped on earlier. The complete code is probably (more
or less) in your inbox.

Sub CallUF()
Dim oFrm As frmBeheerContract
Dim oVars As Word.Variables
Dim pString As String
Dim oRng As Range
Dim i As Long
Set oVars = ActiveDocument.Variables
Set oFrm = New frmBeheerContract
With oFrm
.Show
If .boolProceed Then
' User pressed OK, transfer filled in text to document
oVars("contractnummer") = .contractnummer.Text
oVars("klantnaam") = .klantnaam.Text
oVars("ingangsdatum") = .ingangsdatum.Text
oVars("klantnaam_kort") = .klantnaam_kort.Text
oVars("postcode") = .postcode.Text
oVars("adres") = .adres.Text
oVars("vestigingsplaats") = .vestigingsplaats.Text
oVars("maandvergoeding") = .maandvergoeding.Text
oVars("beheerdiensten") = .beheerdiensten.Text
oVars("systemen") = .systemen.Text
oVars("vertegenwoordiger") = .vertegenwoordiger.Text
UpdateFormVelden
Else
MsgBox ("Form gecanceld by user")
End If
End With

Unload oFrm
Set oFrm = Nothing
Set oVars = Nothing
Set oRng = Nothing
End Sub

In the line
oVars("beheerdiensten") = .beheerdiensten.Text
the contents of the field with the multiline text is read, and transferred
to the Word document.

Does it matter that I place the contents of the field in an indented
DocVariable?

Abel

"Doug Robbins - Word MVP on news.microsof" wrote:

> Show us the code that you are using to transfer the data from the form into
> the document.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
>
> "Abel MacAdam" <AbelMacAdam RemoveThis @discussions.microsoft.com> wrote in message
> news:C094F83F-AE7F-4614-8A82-B802998A09ED@microsoft.com...
> > Hi,
> >
> > In a text field of my form I have put a list of lines. Each line starts
> > with
> > a letter and a bracket, like
> > a) this is the first line
> > b) this is the second line
> > c) this is the third line
> >
> > When I run my form this text comes out in my for as
> > -a) this is the first line
> > --b) this is the second line
> > --c) this is the third line
> > (where a - stands for a space. So the second and following lines have two
> > spaces instead of one)
> >
> > Does anyone know how I can handle this? At the moment I can click in the
> > field in the document and remove the extra spaces. But I know that I have
> > to
> > do that. My unwary users might forget to do it.
> >
> > Abel
>
>
>
Back to top
Login to vote
Doug Robbins - Word MVP o

External


Since: Feb 23, 2009
Posts: 25



(Msg. 4) Posted: Thu Mar 19, 2009 8:05 am
Post subject: Re: Formatting list with "bullets" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If I have a multiline textbox (TextBox1) on a userform with Enter Key
behaviour set to true and I enter

a) this is the first line
b) this is the second line
c) this is the third line

into that textbox and I have a command button which runs the following code

With ActiveDocument
.Variables("varname").Value = Replace(TextBox1.Text, Chr(10), "")
.Range.Fields.Update
End With


and at the left margin I have a { docvariable varname } fields

a) this is the first line
b) this is the second line
c) this is the third line

appears in the without any additional spaces before the items.

Likewise if the docvariable field is in an indented (no hanging indent)
paragraph

If the paragraph has a hanging indent, then I get

a) this is the first line
b) this is the second line
c) this is the third line

where the first line is aligned at the hanging indent and the second and
third lines are aligned at the paragraph indent.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Abel MacAdam" <AbelMacAdam.TakeThisOut@discussions.microsoft.com> wrote in message
news:AD757EF8-400B-4C3D-84ED-63CB0F35A961@microsoft.com...
> Hi Doug,
>
> This is something you helped on earlier. The complete code is probably
> (more
> or less) in your inbox.
>
> Sub CallUF()
> Dim oFrm As frmBeheerContract
> Dim oVars As Word.Variables
> Dim pString As String
> Dim oRng As Range
> Dim i As Long
> Set oVars = ActiveDocument.Variables
> Set oFrm = New frmBeheerContract
> With oFrm
> .Show
> If .boolProceed Then
> ' User pressed OK, transfer filled in text to document
> oVars("contractnummer") = .contractnummer.Text
> oVars("klantnaam") = .klantnaam.Text
> oVars("ingangsdatum") = .ingangsdatum.Text
> oVars("klantnaam_kort") = .klantnaam_kort.Text
> oVars("postcode") = .postcode.Text
> oVars("adres") = .adres.Text
> oVars("vestigingsplaats") = .vestigingsplaats.Text
> oVars("maandvergoeding") = .maandvergoeding.Text
> oVars("beheerdiensten") = .beheerdiensten.Text
> oVars("systemen") = .systemen.Text
> oVars("vertegenwoordiger") = .vertegenwoordiger.Text
> UpdateFormVelden
> Else
> MsgBox ("Form gecanceld by user")
> End If
> End With
>
> Unload oFrm
> Set oFrm = Nothing
> Set oVars = Nothing
> Set oRng = Nothing
> End Sub
>
> In the line
> oVars("beheerdiensten") = .beheerdiensten.Text
> the contents of the field with the multiline text is read, and transferred
> to the Word document.
>
> Does it matter that I place the contents of the field in an indented
> DocVariable?
>
> Abel
>
> "Doug Robbins - Word MVP on news.microsof" wrote:
>
>> Show us the code that you are using to transfer the data from the form
>> into
>> the document.
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
>>
>> "Abel MacAdam" <AbelMacAdam.TakeThisOut@discussions.microsoft.com> wrote in message
>> news:C094F83F-AE7F-4614-8A82-B802998A09ED@microsoft.com...
>> > Hi,
>> >
>> > In a text field of my form I have put a list of lines. Each line starts
>> > with
>> > a letter and a bracket, like
>> > a) this is the first line
>> > b) this is the second line
>> > c) this is the third line
>> >
>> > When I run my form this text comes out in my for as
>> > -a) this is the first line
>> > --b) this is the second line
>> > --c) this is the third line
>> > (where a - stands for a space. So the second and following lines have
>> > two
>> > spaces instead of one)
>> >
>> > Does anyone know how I can handle this? At the moment I can click in
>> > the
>> > field in the document and remove the extra spaces. But I know that I
>> > have
>> > to
>> > do that. My unwary users might forget to do it.
>> >
>> > Abel
>>
>>
>>
Back to top
Login to vote
Abel MacAdam

External


Since: Dec 17, 2007
Posts: 10



(Msg. 5) Posted: Tue Mar 24, 2009 7:59 am
Post subject: Re: Formatting list with "bullets" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Doug,

Thanks, again, for taking the time to help me. Your suggestion is not
exactly helping, although looking at it it should.

Anyway, I just looked at the result in 2007 (I use 2002/XP, but also have
access to a virtual server where 2007 is installed). And I think the result
of what I get is more or less like:
->a) this is the first line
->-<>b) this is the second line
->-<>c) this is the third line

In the three lines -> stands for an indentation. A - stands for a space, and
<> stands for sort of a symbol. It looks to me like the second and third line
are seen by Word as being in the same paragraph as the first line *scratching
head*.

I tried changing the indentation style to hanging, but that had no positive
effect. So either I'm misunderstanding you, or something must be amiss in my
document. I now will try to skip the indentation, and try to emulate numbered
paragraphs without indentation.

Abel

"Doug Robbins - Word MVP on news.microsof" wrote:

> If I have a multiline textbox (TextBox1) on a userform with Enter Key
> behaviour set to true and I enter
>
> a) this is the first line
> b) this is the second line
> c) this is the third line
>
> into that textbox and I have a command button which runs the following code
>
> With ActiveDocument
> .Variables("varname").Value = Replace(TextBox1.Text, Chr(10), "")
> .Range.Fields.Update
> End With
>
>
> and at the left margin I have a { docvariable varname } fields
>
> a) this is the first line
> b) this is the second line
> c) this is the third line
>
> appears in the without any additional spaces before the items.
>
> Likewise if the docvariable field is in an indented (no hanging indent)
> paragraph
>
> If the paragraph has a hanging indent, then I get
>
> a) this is the first line
> b) this is the second line
> c) this is the third line
>
> where the first line is aligned at the hanging indent and the second and
> third lines are aligned at the paragraph indent.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
>
> "Abel MacAdam" <AbelMacAdam.DeleteThis@discussions.microsoft.com> wrote in message
> news:AD757EF8-400B-4C3D-84ED-63CB0F35A961@microsoft.com...
> > Hi Doug,
> >
> > This is something you helped on earlier. The complete code is probably
> > (more
> > or less) in your inbox.
> >
> > Sub CallUF()
> > Dim oFrm As frmBeheerContract
> > Dim oVars As Word.Variables
> > Dim pString As String
> > Dim oRng As Range
> > Dim i As Long
> > Set oVars = ActiveDocument.Variables
> > Set oFrm = New frmBeheerContract
> > With oFrm
> > .Show
> > If .boolProceed Then
> > ' User pressed OK, transfer filled in text to document
> > oVars("contractnummer") = .contractnummer.Text
> > oVars("klantnaam") = .klantnaam.Text
> > oVars("ingangsdatum") = .ingangsdatum.Text
> > oVars("klantnaam_kort") = .klantnaam_kort.Text
> > oVars("postcode") = .postcode.Text
> > oVars("adres") = .adres.Text
> > oVars("vestigingsplaats") = .vestigingsplaats.Text
> > oVars("maandvergoeding") = .maandvergoeding.Text
> > oVars("beheerdiensten") = .beheerdiensten.Text
> > oVars("systemen") = .systemen.Text
> > oVars("vertegenwoordiger") = .vertegenwoordiger.Text
> > UpdateFormVelden
> > Else
> > MsgBox ("Form gecanceld by user")
> > End If
> > End With
> >
> > Unload oFrm
> > Set oFrm = Nothing
> > Set oVars = Nothing
> > Set oRng = Nothing
> > End Sub
> >
> > In the line
> > oVars("beheerdiensten") = .beheerdiensten.Text
> > the contents of the field with the multiline text is read, and transferred
> > to the Word document.
> >
> > Does it matter that I place the contents of the field in an indented
> > DocVariable?
> >
> > Abel
> >
> > "Doug Robbins - Word MVP on news.microsof" wrote:
> >
> >> Show us the code that you are using to transfer the data from the form
> >> into
> >> the document.
> >>
> >> --
> >> Hope this helps.
> >>
> >> Please reply to the newsgroup unless you wish to avail yourself of my
> >> services on a paid consulting basis.
> >>
> >> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
> >>
> >> "Abel MacAdam" <AbelMacAdam.DeleteThis@discussions.microsoft.com> wrote in message
> >> news:C094F83F-AE7F-4614-8A82-B802998A09ED@microsoft.com...
> >> > Hi,
> >> >
> >> > In a text field of my form I have put a list of lines. Each line starts
> >> > with
> >> > a letter and a bracket, like
> >> > a) this is the first line
> >> > b) this is the second line
> >> > c) this is the third line
> >> >
> >> > When I run my form this text comes out in my for as
> >> > -a) this is the first line
> >> > --b) this is the second line
> >> > --c) this is the third line
> >> > (where a - stands for a space. So the second and following lines have
> >> > two
> >> > spaces instead of one)
> >> >
> >> > Does anyone know how I can handle this? At the moment I can click in
> >> > the
> >> > field in the document and remove the extra spaces. But I know that I
> >> > have
> >> > to
> >> > do that. My unwary users might forget to do it.
> >> >
> >> > Abel
> >>
> >>
> >>
>
>
>
Back to top
Login to vote
Doug Robbins - Word MVP o

External


Since: Feb 23, 2009
Posts: 25



(Msg. 6) Posted: Tue Mar 24, 2009 7:05 pm
Post subject: Re: Formatting list with "bullets" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Using 2007, doing what I mentioned, I do not get any of the ->

If you want to send something to me at dkr RemoveThis @mvps.org I will take a look at
it.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Abel MacAdam" <AbelMacAdam RemoveThis @discussions.microsoft.com> wrote in message
news:76A99BDF-7E3D-4321-928F-8E9482D6B157@microsoft.com...
> Hi Doug,
>
> Thanks, again, for taking the time to help me. Your suggestion is not
> exactly helping, although looking at it it should.
>
> Anyway, I just looked at the result in 2007 (I use 2002/XP, but also have
> access to a virtual server where 2007 is installed). And I think the
> result
> of what I get is more or less like:
> ->a) this is the first line
> ->-<>b) this is the second line
> ->-<>c) this is the third line
>
> In the three lines -> stands for an indentation. A - stands for a space,
> and
> <> stands for sort of a symbol. It looks to me like the second and third
> line
> are seen by Word as being in the same paragraph as the first line
> *scratching
> head*.
>
> I tried changing the indentation style to hanging, but that had no
> positive
> effect. So either I'm misunderstanding you, or something must be amiss in
> my
> document. I now will try to skip the indentation, and try to emulate
> numbered
> paragraphs without indentation.
>
> Abel
>
> "Doug Robbins - Word MVP on news.microsof" wrote:
>
>> If I have a multiline textbox (TextBox1) on a userform with Enter Key
>> behaviour set to true and I enter
>>
>> a) this is the first line
>> b) this is the second line
>> c) this is the third line
>>
>> into that textbox and I have a command button which runs the following
>> code
>>
>> With ActiveDocument
>> .Variables("varname").Value = Replace(TextBox1.Text, Chr(10), "")
>> .Range.Fields.Update
>> End With
>>
>>
>> and at the left margin I have a { docvariable varname } fields
>>
>> a) this is the first line
>> b) this is the second line
>> c) this is the third line
>>
>> appears in the without any additional spaces before the items.
>>
>> Likewise if the docvariable field is in an indented (no hanging indent)
>> paragraph
>>
>> If the paragraph has a hanging indent, then I get
>>
>> a) this is the first line
>> b) this is the second line
>> c) this is the third line
>>
>> where the first line is aligned at the hanging indent and the second and
>> third lines are aligned at the paragraph indent.
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
>>
>> "Abel MacAdam" <AbelMacAdam RemoveThis @discussions.microsoft.com> wrote in message
>> news:AD757EF8-400B-4C3D-84ED-63CB0F35A961@microsoft.com...
>> > Hi Doug,
>> >
>> > This is something you helped on earlier. The complete code is probably
>> > (more
>> > or less) in your inbox.
>> >
>> > Sub CallUF()
>> > Dim oFrm As frmBeheerContract
>> > Dim oVars As Word.Variables
>> > Dim pString As String
>> > Dim oRng As Range
>> > Dim i As Long
>> > Set oVars = ActiveDocument.Variables
>> > Set oFrm = New frmBeheerContract
>> > With oFrm
>> > .Show
>> > If .boolProceed Then
>> > ' User pressed OK, transfer filled in text to document
>> > oVars("contractnummer") = .contractnummer.Text
>> > oVars("klantnaam") = .klantnaam.Text
>> > oVars("ingangsdatum") = .ingangsdatum.Text
>> > oVars("klantnaam_kort") = .klantnaam_kort.Text
>> > oVars("postcode") = .postcode.Text
>> > oVars("adres") = .adres.Text
>> > oVars("vestigingsplaats") = .vestigingsplaats.Text
>> > oVars("maandvergoeding") = .maandvergoeding.Text
>> > oVars("beheerdiensten") = .beheerdiensten.Text
>> > oVars("systemen") = .systemen.Text
>> > oVars("vertegenwoordiger") = .vertegenwoordiger.Text
>> > UpdateFormVelden
>> > Else
>> > MsgBox ("Form gecanceld by user")
>> > End If
>> > End With
>> >
>> > Unload oFrm
>> > Set oFrm = Nothing
>> > Set oVars = Nothing
>> > Set oRng = Nothing
>> > End Sub
>> >
>> > In the line
>> > oVars("beheerdiensten") = .beheerdiensten.Text
>> > the contents of the field with the multiline text is read, and
>> > transferred
>> > to the Word document.
>> >
>> > Does it matter that I place the contents of the field in an indented
>> > DocVariable?
>> >
>> > Abel
>> >
>> > "Doug Robbins - Word MVP on news.microsof" wrote:
>> >
>> >> Show us the code that you are using to transfer the data from the form
>> >> into
>> >> the document.
>> >>
>> >> --
>> >> Hope this helps.
>> >>
>> >> Please reply to the newsgroup unless you wish to avail yourself of my
>> >> services on a paid consulting basis.
>> >>
>> >> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
>> >>
>> >> "Abel MacAdam" <AbelMacAdam RemoveThis @discussions.microsoft.com> wrote in
>> >> message
>> >> news:C094F83F-AE7F-4614-8A82-B802998A09ED@microsoft.com...
>> >> > Hi,
>> >> >
>> >> > In a text field of my form I have put a list of lines. Each line
>> >> > starts
>> >> > with
>> >> > a letter and a bracket, like
>> >> > a) this is the first line
>> >> > b) this is the second line
>> >> > c) this is the third line
>> >> >
>> >> > When I run my form this text comes out in my for as
>> >> > -a) this is the first line
>> >> > --b) this is the second line
>> >> > --c) this is the third line
>> >> > (where a - stands for a space. So the second and following lines
>> >> > have
>> >> > two
>> >> > spaces instead of one)
>> >> >
>> >> > Does anyone know how I can handle this? At the moment I can click in
>> >> > the
>> >> > field in the document and remove the extra spaces. But I know that I
>> >> > have
>> >> > to
>> >> > do that. My unwary users might forget to do it.
>> >> >
>> >> > Abel
>> >>
>> >>
>> >>
>>
>>
>>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> User Forms All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support