Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
MDales MDales is offline
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
MDales MDales is offline
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
MDales MDales is offline
external usenet poster
 
Posts: 20
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with IncludeText and RD to assemble docs into one large fi LAS in STL New Users 3 April 24th 07 05:22 PM
Putting text into scanned docs tessaamy Microsoft Word Help 0 October 3rd 06 07:25 PM
putting tabs in a mail merge field? mike_mike Mailmerge 4 April 5th 06 12:51 PM
Putting the same lines into 3 different docs Michael Microsoft Word Help 4 April 21st 05 02:53 PM
Includetext Merge Field Jan Mailmerge 1 April 19th 05 01:36 AM


All times are GMT +1. The time now is 05:17 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"