N
Newforms
Hello all,
I have put together this form to fill out bookmarks within a word
document/template; but have become stumped (please bear in mind I have
been working in VB for just a few days now.. I'm a graphic designer at
heart . My current problem is that where I insert the text at the
"pleasenote" bookmark I need to fill out the variables within the text
labelled "termly" and "amount", also in the third piece of text you
will see I have three amounts to fill out.
Now with the text being generated I dont know a way of including the
bookmarks in the inserted text, or whether they will update when the
button is pressed... I could go on but am confusing myself.
So basically: I want to be able to change variables in the text
inserted at bookmarks.
Without further delay:
Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("accountnumber").Range _
.InsertBefore TextBox1
.Bookmarks("drawdownamount").Range _
.InsertBefore TextBox2
.Bookmarks("undrawnbalance").Range _
.InsertBefore TextBox3
.Bookmarks("interestrate").Range _
.InsertBefore TextBox4
End With
Dim mytext As String
If OptionButton1.Value = True Then
pleasenote = "per annum and your regular <termly> payments will be
$<amount> commencing <date>."
ElseIf OptionButton2.Value = True Then
pleasenote = "per annum and your regular <termly> payments will be
$<amount> commencing <date>."
ElseIf OptionButton3.Value = True Then
pleasenote = "per annum and your regular <termly> payments will
vary as follows, depending on the number of days in the month; 31 day
months $<amount>, 30 day months $<amount>, February month $<amount>."
Else
mytext = "You need to select either weekly, fortnightly, or
monthly"
End If
ActiveDocument.Bookmarks("pleasenote").Range.InsertBefore pleasenote
ActiveDocument.Bookmarks("pleasenote").Range.Font.Size = 6
ficdd.Hide
End Sub
Any help appreciated, thanks in advance! Jon
I have put together this form to fill out bookmarks within a word
document/template; but have become stumped (please bear in mind I have
been working in VB for just a few days now.. I'm a graphic designer at
heart . My current problem is that where I insert the text at the
"pleasenote" bookmark I need to fill out the variables within the text
labelled "termly" and "amount", also in the third piece of text you
will see I have three amounts to fill out.
Now with the text being generated I dont know a way of including the
bookmarks in the inserted text, or whether they will update when the
button is pressed... I could go on but am confusing myself.
So basically: I want to be able to change variables in the text
inserted at bookmarks.
Without further delay:
Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("accountnumber").Range _
.InsertBefore TextBox1
.Bookmarks("drawdownamount").Range _
.InsertBefore TextBox2
.Bookmarks("undrawnbalance").Range _
.InsertBefore TextBox3
.Bookmarks("interestrate").Range _
.InsertBefore TextBox4
End With
Dim mytext As String
If OptionButton1.Value = True Then
pleasenote = "per annum and your regular <termly> payments will be
$<amount> commencing <date>."
ElseIf OptionButton2.Value = True Then
pleasenote = "per annum and your regular <termly> payments will be
$<amount> commencing <date>."
ElseIf OptionButton3.Value = True Then
pleasenote = "per annum and your regular <termly> payments will
vary as follows, depending on the number of days in the month; 31 day
months $<amount>, 30 day months $<amount>, February month $<amount>."
Else
mytext = "You need to select either weekly, fortnightly, or
monthly"
End If
ActiveDocument.Bookmarks("pleasenote").Range.InsertBefore pleasenote
ActiveDocument.Bookmarks("pleasenote").Range.Font.Size = 6
ficdd.Hide
End Sub
Any help appreciated, thanks in advance! Jon