Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
INCLUDETEXT putting both docs into merge
What have I doing wrong here? I want the merge to insert one document if you
answer "loan" and a different document if you answer "LOC" . I get an error message "A field calcualtion error occurred in Record 1" and it inserts BOTH documents. Here's what I've done codes: {ASK LoanOrLOC "Is this a Loan or a Line of Credit? (loan or LOC)" \o}{IF {"ASK LoanOrLOC" } = "loan" ""{INCLUDETEXT "N:\\Precedents\\Loan Approval Merge.doc" } ""} {IF {"ASK LoanOrLOC"} = "LOC" "" {INCLUDETEXT "N:\\Precedents\\Solicitor's Certificate Merge.doc"} ""} I'm fairly new at this and it sure is more difficult than with WordPerfect, which simply let you string macros together. Would sure like to know what I'm doing wrong. Martha |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
INCLUDETEXT putting both docs into merge
To start with, instead of the two If...then...Else constructions, you can
use {IF {"ASK LoanOrLOC" } = "loan" {INCLUDETEXT "N:\\Precedents\\Loan Approval Merge.doc" } {INCLUDETEXT "N:\\Precedents\\Solicitor's Certificate Merge.doc"} } But I suspect that the reason that you might be getting both documents is that the response to the IF is neither "loan" nor "LOC" and with the double quotes that you had before the "" {INCLUDETEXT part of each If...then...Else field construction, you were getting the Not True result in both cases. If using the modified If...then...Else always gives the same result, regardless of whether "loan" or "LOC" is supplied, that would confirm my suspicion and I would suggest that if you can, you add a field to the datasource in which you specify which type of transaction it is and then test for the value of that mergefield. -- 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 "MDales" wrote in message ... What have I doing wrong here? I want the merge to insert one document if you answer "loan" and a different document if you answer "LOC" . I get an error message "A field calcualtion error occurred in Record 1" and it inserts BOTH documents. Here's what I've done codes: {ASK LoanOrLOC "Is this a Loan or a Line of Credit? (loan or LOC)" \o}{IF {"ASK LoanOrLOC" } = "loan" ""{INCLUDETEXT "N:\\Precedents\\Loan Approval Merge.doc" } ""} {IF {"ASK LoanOrLOC"} = "LOC" "" {INCLUDETEXT "N:\\Precedents\\Solicitor's Certificate Merge.doc"} ""} I'm fairly new at this and it sure is more difficult than with WordPerfect, which simply let you string macros together. Would sure like to know what I'm doing wrong. Martha |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
INCLUDETEXT putting both docs into merge
Thanks. I changed it to add a field to the data source. It now inserts the
correct document, but I still get the same error message. Do I still have anything extra in my codes? or maybe it's some other field causing the problem. I will check the rest of the document, but in the meantime does this look right? {IF [MERGEFIELD LoanOrLineofCredit } = Loan {INCLUDETEXT N:\\Precedents\\Loan Approval.doc} {ELSE {INCLUDETEXT N:\\Precedents\\Certificate.doc:}} } Martha "Doug Robbins - Word MVP" wrote: To start with, instead of the two If...then...Else constructions, you can use {IF {"ASK LoanOrLOC" } = "loan" {INCLUDETEXT "N:\\Precedents\\Loan Approval Merge.doc" } {INCLUDETEXT "N:\\Precedents\\Solicitor's Certificate Merge.doc"} } But I suspect that the reason that you might be getting both documents is that the response to the IF is neither "loan" nor "LOC" and with the double quotes that you had before the "" {INCLUDETEXT part of each If...then...Else field construction, you were getting the Not True result in both cases. If using the modified If...then...Else always gives the same result, regardless of whether "loan" or "LOC" is supplied, that would confirm my suspicion and I would suggest that if you can, you add a field to the datasource in which you specify which type of transaction it is and then test for the value of that mergefield. -- 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 "MDales" wrote in message ... What have I doing wrong here? I want the merge to insert one document if you answer "loan" and a different document if you answer "LOC" . I get an error message "A field calcualtion error occurred in Record 1" and it inserts BOTH documents. Here's what I've done codes: {ASK LoanOrLOC "Is this a Loan or a Line of Credit? (loan or LOC)" \o}{IF {"ASK LoanOrLOC" } = "loan" ""{INCLUDETEXT "N:\\Precedents\\Loan Approval Merge.doc" } ""} {IF {"ASK LoanOrLOC"} = "LOC" "" {INCLUDETEXT "N:\\Precedents\\Solicitor's Certificate Merge.doc"} ""} I'm fairly new at this and it sure is more difficult than with WordPerfect, which simply let you string macros together. Would sure like to know what I'm doing wrong. Martha |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
INCLUDETEXT putting both docs into merge
Please ignore my last question. I revised it to read:
{IF [MERGEFIELD LoanOrLineofCredit } = Loan {INCLUDETEXT N:\\Precedents\\Loan Approval.doc} {INCLUDETEXT N:\\Precedents\\Certificate.doc:} } and found another error in a different field that was causing the error message. It all works as needed now. So thanks so much for your help! Martha "MDales" wrote: Thanks. I changed it to add a field to the data source. It now inserts the correct document, but I still get the same error message. Do I still have anything extra in my codes? or maybe it's some other field causing the problem. I will check the rest of the document, but in the meantime does this look right? {IF [MERGEFIELD LoanOrLineofCredit } = Loan {INCLUDETEXT N:\\Precedents\\Loan Approval.doc} {ELSE {INCLUDETEXT N:\\Precedents\\Certificate.doc:}} } Martha "Doug Robbins - Word MVP" wrote: To start with, instead of the two If...then...Else constructions, you can use {IF {"ASK LoanOrLOC" } = "loan" {INCLUDETEXT "N:\\Precedents\\Loan Approval Merge.doc" } {INCLUDETEXT "N:\\Precedents\\Solicitor's Certificate Merge.doc"} } But I suspect that the reason that you might be getting both documents is that the response to the IF is neither "loan" nor "LOC" and with the double quotes that you had before the "" {INCLUDETEXT part of each If...then...Else field construction, you were getting the Not True result in both cases. If using the modified If...then...Else always gives the same result, regardless of whether "loan" or "LOC" is supplied, that would confirm my suspicion and I would suggest that if you can, you add a field to the datasource in which you specify which type of transaction it is and then test for the value of that mergefield. -- 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 "MDales" wrote in message ... What have I doing wrong here? I want the merge to insert one document if you answer "loan" and a different document if you answer "LOC" . I get an error message "A field calcualtion error occurred in Record 1" and it inserts BOTH documents. Here's what I've done codes: {ASK LoanOrLOC "Is this a Loan or a Line of Credit? (loan or LOC)" \o}{IF {"ASK LoanOrLOC" } = "loan" ""{INCLUDETEXT "N:\\Precedents\\Loan Approval Merge.doc" } ""} {IF {"ASK LoanOrLOC"} = "LOC" "" {INCLUDETEXT "N:\\Precedents\\Solicitor's Certificate Merge.doc"} ""} I'm fairly new at this and it sure is more difficult than with WordPerfect, which simply let you string macros together. Would sure like to know what I'm doing wrong. Martha |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trouble with IncludeText and RD to assemble docs into one large fi | New Users | |||
Putting text into scanned docs | Microsoft Word Help | |||
putting tabs in a mail merge field? | Mailmerge | |||
Putting the same lines into 3 different docs | Microsoft Word Help | |||
Includetext Merge Field | Mailmerge |