A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

PRINT code



 
 
Thread Tools Display Modes
  #1  
Old May 14th, 2004, 10:00 AM
Garry Rathbone
external usenet poster
 
Posts: n/a
Default PRINT code

I have a document that has several IF tests. If the user
responds with a Y to a test, a document is included using
INCLUDETEXT.

We use PRINT codes to switch the printer into duplex mode
in certain documents. These documents work fine on their
own, and fine when included with INCLUDETEXT. However, if
the INCLUDETEXT is conditional via an IF, the PRINT codes
don't work!

For example:

Doc1.doc is a 5 page document that has a PRINT command at
the start to switch the printer (HP4000) into Duplex:
{PRINT 27"&l1s"}

Doc2.doc has the following field in it:

{IF {FILLIN Include_DOC_1}="Y" "{INCLUDETEXT "DOC1.DOC"}"}

Any ideas? Any help appreciated.

Cheers,


Garry




  #2  
Old May 14th, 2004, 12:15 PM
Peter Jamieson
external usenet poster
 
Posts: n/a
Default PRINT code

I haven't seen this problem before and don't know of a fix, but...

If it's the combination of INCLUDETEXT nested in an IF that's causing the
problem, what I would try is to ensure the INCLUDETEXT is outside the IF.
You will always have to include /a/ file. e.g. have an empty document called
empty.doc and try either

{ INCLUDETEXT "{ IF "{ FILLIN Include_DOC_1 }" = "Y" "DOC1.DOC"
"empty.doc" }" }

or

{ IF "{FILLIN Include_DOC_1}" = "Y"
"{ SET mydoc1 "DOC1.DOC" }"
"{ SET mydoc1 "empty.doc" }"
}{ INCLUDETEXT "{ REF mydoc1 }" }

--
Peter Jamieson

"Garry Rathbone" wrote in message
...
I have a document that has several IF tests. If the user
responds with a Y to a test, a document is included using
INCLUDETEXT.

We use PRINT codes to switch the printer into duplex mode
in certain documents. These documents work fine on their
own, and fine when included with INCLUDETEXT. However, if
the INCLUDETEXT is conditional via an IF, the PRINT codes
don't work!

For example:

Doc1.doc is a 5 page document that has a PRINT command at
the start to switch the printer (HP4000) into Duplex:
{PRINT 27"&l1s"}

Doc2.doc has the following field in it:

{IF {FILLIN Include_DOC_1}="Y" "{INCLUDETEXT "DOC1.DOC"}"}

Any ideas? Any help appreciated.

Cheers,


Garry






  #3  
Old May 14th, 2004, 02:32 PM
Garry Rathbone
external usenet poster
 
Posts: n/a
Default PRINT code

Peter,

Thanks for your suggestion, it works great. INCLUDETEXT
seems to add an extra return even when there's nothing in
the empty document, but we can live with that.

Thanks again,

Garry


-----Original Message-----
I haven't seen this problem before and don't know of a

fix, but...

If it's the combination of INCLUDETEXT nested in an IF

that's causing the
problem, what I would try is to ensure the INCLUDETEXT

is outside the IF.
You will always have to include /a/ file. e.g. have an

empty document called
empty.doc and try either

{ INCLUDETEXT "{ IF "{ FILLIN Include_DOC_1 }"

= "Y" "DOC1.DOC"
"empty.doc" }" }

or

{ IF "{FILLIN Include_DOC_1}" = "Y"
"{ SET mydoc1 "DOC1.DOC" }"
"{ SET mydoc1 "empty.doc" }"
}{ INCLUDETEXT "{ REF mydoc1 }" }

--
Peter Jamieson

"Garry Rathbone"

wrote in message
...
I have a document that has several IF tests. If the

user
responds with a Y to a test, a document is included

using
INCLUDETEXT.

We use PRINT codes to switch the printer into duplex

mode
in certain documents. These documents work fine on

their
own, and fine when included with INCLUDETEXT. However,

if
the INCLUDETEXT is conditional via an IF, the PRINT

codes
don't work!

For example:

Doc1.doc is a 5 page document that has a PRINT command

at
the start to switch the printer (HP4000) into Duplex:
{PRINT 27"&l1s"}

Doc2.doc has the following field in it:

{IF {FILLIN Include_DOC_1}

="Y" "{INCLUDETEXT "DOC1.DOC"}"}

Any ideas? Any help appreciated.

Cheers,


Garry






.

  #4  
Old May 14th, 2004, 11:14 PM
macropod
external usenet poster
 
Posts: n/a
Default PRINT code

Hi Garry,

I think you'll find that the problem with your original field was that there
was no space between the '=' and the "Y". That is, instead of:
{IF {FILLIN Include_DOC_1}="Y" "{INCLUDETEXT "DOC1.DOC"}"}
you needed:
{IF {FILLIN Include_DOC_1}= "Y" "{INCLUDETEXT "DOC1.DOC"}"}
or:
{IF {FILLIN Include_DOC_1}= "Y" {INCLUDETEXT "DOC1.DOC"}}


Cheers


"Garry Rathbone" wrote in message
...
I have a document that has several IF tests. If the user
responds with a Y to a test, a document is included using
INCLUDETEXT.

We use PRINT codes to switch the printer into duplex mode
in certain documents. These documents work fine on their
own, and fine when included with INCLUDETEXT. However, if
the INCLUDETEXT is conditional via an IF, the PRINT codes
don't work!

For example:

Doc1.doc is a 5 page document that has a PRINT command at
the start to switch the printer (HP4000) into Duplex:
{PRINT 27"&l1s"}

Doc2.doc has the following field in it:

{IF {FILLIN Include_DOC_1}="Y" "{INCLUDETEXT "DOC1.DOC"}"}

Any ideas? Any help appreciated.

Cheers,


Garry






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.684 / Virus Database: 446 - Release Date: 13/05/2004


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.