Z
zirac
I'm currently updating an old template. When I open the template and double
click anywhere on the document, a dialog box will open and let me select from
the checkbox. After I click OK, A line or lines will be inserted on the
letter saying that we are asking for the selected documents. I now want to
change the test on the lines but I can't find it on the codes. Are they
saved somewhere?
Also, when I try to print this letter using a macro so it will print 1 in
letterhead and 1 in plain it's not printing correclty. It's printing in 3
different pages. But it works fine if I use the normal print button.
See part of the codes below:
WordBasic.BeginDialog 400, 240, "Details"
WordBasic.GroupBox 21, 2, 280, 200, "Select which documents are required"
WordBasic.CheckBox 56, 16, 200, 18, "Mortgage certificate:", "Mort"
WordBasic.CheckBox 56, 38, 200, 18, "Loan certificate:", "Loan"
WordBasic.OKButton 310, 6, 88, 21
WordBasic.CancelButton 310, 30, 88, 21
WordBasic.EndDialog
Dim Lettera As Object: Set Lettera = WordBasic.CurValues.UserDialog
WordBasic.ViewPage
WordBasic.DisableInput 1
n = WordBasic.Dialog.UserDialog(Lettera)
WordBasic.DisableInput 0
Mort = Lettera.Mort
Loan = Lettera.Loan
WordBasic.ScreenUpdating 0
WordBasic.ToolsUnprotectDocument DocumentPassword:="test"
WordBasic.WW7_EditGoTo Destination:="s2"
If Mort = 1 Then
WordBasic.InsertPara
WordBasic.InsertPara
WordBasic.WW7_EditAutoText Name:="mortgage", InsertAs:=1, Insert:=1
End If
If Loan = 1 Then
WordBasic.InsertPara
WordBasic.InsertPara
WordBasic.WW7_EditAutoText Name:="Loan", InsertAs:=1, Insert:=1
End If
click anywhere on the document, a dialog box will open and let me select from
the checkbox. After I click OK, A line or lines will be inserted on the
letter saying that we are asking for the selected documents. I now want to
change the test on the lines but I can't find it on the codes. Are they
saved somewhere?
Also, when I try to print this letter using a macro so it will print 1 in
letterhead and 1 in plain it's not printing correclty. It's printing in 3
different pages. But it works fine if I use the normal print button.
See part of the codes below:
WordBasic.BeginDialog 400, 240, "Details"
WordBasic.GroupBox 21, 2, 280, 200, "Select which documents are required"
WordBasic.CheckBox 56, 16, 200, 18, "Mortgage certificate:", "Mort"
WordBasic.CheckBox 56, 38, 200, 18, "Loan certificate:", "Loan"
WordBasic.OKButton 310, 6, 88, 21
WordBasic.CancelButton 310, 30, 88, 21
WordBasic.EndDialog
Dim Lettera As Object: Set Lettera = WordBasic.CurValues.UserDialog
WordBasic.ViewPage
WordBasic.DisableInput 1
n = WordBasic.Dialog.UserDialog(Lettera)
WordBasic.DisableInput 0
Mort = Lettera.Mort
Loan = Lettera.Loan
WordBasic.ScreenUpdating 0
WordBasic.ToolsUnprotectDocument DocumentPassword:="test"
WordBasic.WW7_EditGoTo Destination:="s2"
If Mort = 1 Then
WordBasic.InsertPara
WordBasic.InsertPara
WordBasic.WW7_EditAutoText Name:="mortgage", InsertAs:=1, Insert:=1
End If
If Loan = 1 Then
WordBasic.InsertPara
WordBasic.InsertPara
WordBasic.WW7_EditAutoText Name:="Loan", InsertAs:=1, Insert:=1
End If