saoirse
01-20-2011, 03:57 AM
Hi,
Let me start by saying that i have no idea what i'm doing - frankly i'm surprised i've managed to get as far as i have through piecing together bits of knowledge. But, i've actually managed to get my form to do what i want it to do apart from one little issue... :banghead:
Here's what i'm trying to do:
I've created a letter template in Word 2003.
There is a section of conditional text, if its a fax letter, i've got it to enter certain text into the document using the following code:Private Sub FaxOnly_Click()
If FaxOnly.Value = "True" Then
ActiveDocument.Bookmarks("FaxLtr").Range.InsertBefore "BY FACSIMILE ONLY:"
ActiveDocument.Bookmarks("PagesTxt").Range.InsertBefore "NO. OF PAGES (including this page):"
End If
End Sub
Private Sub AndFax_Click()
If AndFax.Value = "True" Then
ActiveDocument.Bookmarks("FaxLtr").Range.InsertBefore "AND BY FACSIMILE:"
ActiveDocument.Bookmarks("PagesTxt").Range.InsertBefore "NO. OF PAGES (including this page):"
End If
End Sub
So, as you might have guessed, there are two radio buttons, one labeled "By facsimile only" and the other labeled "And by facsimile". Depending upon which button is pressed, the form enters the relevant text as required.
The above code does what i want it to do, however, it also enters "True" or "False" depending upon whether one or other or neither of the buttons is selected. So if the operator selects "By facsimile only" the form enters "TRUEBy Facsimile Only" into the main document. Similarly it enters "TRUEAnd By Facsimile" if that button is selected. If neither button is selected then it enters "FALSE" into the document...
I thought i might have got it to avoid the true/false return by asking it to enter certain text if true - but it still enters "true" and then my text...
Either radio button or neither are acceptable options (it might be a mail only letter) - i simply want it to stop entering TRUE or FALSE as a result for the radio buttons.
Surely this is something really simple that i've missed...
I would be really grateful if anyone can help.
Thank you in advance,
Saoirse.
Let me start by saying that i have no idea what i'm doing - frankly i'm surprised i've managed to get as far as i have through piecing together bits of knowledge. But, i've actually managed to get my form to do what i want it to do apart from one little issue... :banghead:
Here's what i'm trying to do:
I've created a letter template in Word 2003.
There is a section of conditional text, if its a fax letter, i've got it to enter certain text into the document using the following code:Private Sub FaxOnly_Click()
If FaxOnly.Value = "True" Then
ActiveDocument.Bookmarks("FaxLtr").Range.InsertBefore "BY FACSIMILE ONLY:"
ActiveDocument.Bookmarks("PagesTxt").Range.InsertBefore "NO. OF PAGES (including this page):"
End If
End Sub
Private Sub AndFax_Click()
If AndFax.Value = "True" Then
ActiveDocument.Bookmarks("FaxLtr").Range.InsertBefore "AND BY FACSIMILE:"
ActiveDocument.Bookmarks("PagesTxt").Range.InsertBefore "NO. OF PAGES (including this page):"
End If
End Sub
So, as you might have guessed, there are two radio buttons, one labeled "By facsimile only" and the other labeled "And by facsimile". Depending upon which button is pressed, the form enters the relevant text as required.
The above code does what i want it to do, however, it also enters "True" or "False" depending upon whether one or other or neither of the buttons is selected. So if the operator selects "By facsimile only" the form enters "TRUEBy Facsimile Only" into the main document. Similarly it enters "TRUEAnd By Facsimile" if that button is selected. If neither button is selected then it enters "FALSE" into the document...
I thought i might have got it to avoid the true/false return by asking it to enter certain text if true - but it still enters "true" and then my text...
Either radio button or neither are acceptable options (it might be a mail only letter) - i simply want it to stop entering TRUE or FALSE as a result for the radio buttons.
Surely this is something really simple that i've missed...
I would be really grateful if anyone can help.
Thank you in advance,
Saoirse.