Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Importing Page Break (code/ASCII?)

1,563 views
Skip to first unread message

Paul Miller

unread,
Mar 17, 2003, 10:09:03 AM3/17/03
to
I need help importing a page break as ASCII or other that
can be imported with merged data... I've already gotten
some help in the Merge newsgroup - can this newgroup help
or is there a better one?

What I want to do is have a page break be imported along
with mail merge data (all data and the page break(s) would
come in through one merge field/variable). So the page
break would need to be part of the data, and so I need
some kind of ASCII or other programming that will cause
one to generate once it is in Word.

You can see below the conversation about ASCII character
12 that I've had in the Merge newsgroup...but I don't know
if that is the thing to do, or how to do it, or if it will
even work.

Thanks very much,
-Paul Miller
Baylor University Financial Aid
Waco, TX

I could not get this to work...can tell me how to get an
ASCII 12 character? (How to insert into Word OR into my
data)? I tried using Ctrl+M and that didn't work (^m is
what Word Find/Replace lists when you choose a manual page
break special character).

I'm also a little confused on the number being 12... On
the web I found ASCII charts that list:
LINE FEED as Oct 12, Dec 10, Hex a, CTRL+J
FORM FEED, PAGE EJECT as Oct 14, Dec 12, Hex c, CTRL+L
CARRIAGE RETURN as Oct 15, Dec 13, Hex d, CTRL+M
So my other question is - which number am I going by for
the 12...the Oct or Dec? AND why does the CTRL+M (^m) not
line up with ^12 as is seems to when you use Word Find on
a doc with a page break?

I got the Carriage return (CTRL+M) to work in Notepad on a
txt file, but it just created a paragraph mark (not a page
break as implied in Word Find/Replace).

I am using Office XP...am I out of luck?
Is there another newsgroup that would be a better forum
for these questions?
Thanks for all your help!
-Paul Miller
Baylor University Financial Aid
Waco, TX

>-----Original Message-----
>An ASCII 12 character in a data field in a text file will
insert a page
>break into Word (at least, this works if the text file is
opened using the
>default connection method in Word 2000, not sure what
happens if you are
>using Word 2002, OLEDB etc). I don't know whehter that
works if the
>character is e.g. inside an Access text field.
>
>I don't know of a character that will insert a section
break. Interestingly,
>if you use numeric codes in Word Find|Replace to look for
page or section
>breaks (e.g. ^13 for a paragraph mark etc.) Word uses the
same numeric code
>(^12) for both page breaks and section breaks.
>
>> ...or would a
>> section break cause the next record to load?
>
>I doubt it (assuming you could do it!).
>
>--
>Peter Jamieson
>MS Word MVP
>
>"Paul Miller" <Paul_...@baylor.edu> wrote in message
>news:020201c2e9ac$fbe08fc0$a401...@phx.gbl...
>> I need a way to break up a long field result (of a
>> variable) that is up to 3 pages of text in length and
put
>> each section of it on a new page. (The data is created
>> and extracted in a different program, and I'm unable to
>> separate it into multiple variables or to use the
>> INCLUDETEXT command.)
>>
>> Is there a way (such as a set of characters, programming
>> codes, etc) to include a page break within the data to
>> cause a page break and put the data from that point
>> forward onto a separate page?
>>
>> IF SO (thinking out loud) ...Would this be a possibly
be a
>> section break instead of a page break? ...or would a
>> section break cause the next record to load? ...and
would
>> that be avoidable by choosing something besides 'letter'
>> for the merge document type?
>>
>> Thanks,
>> -Paul Miller
>> Baylor University Financial Aid
>> Waco, TX
>
>
>
>
>.
>
.


Jay Freedman

unread,
Mar 17, 2003, 3:38:20 PM3/17/03
to
Hi, Paul,

I'll try to dispel some of the cobwebs...

Part of the problem is just terminology. Realize that ASCII goes back to the
days of teletype, even before CRT screens were common. The "page break"
character is what ASCII calls "form feed", and on a teletype it literally
caused the (roll or fanfold) paper to feed to the next top-of-page position.
That character is (decimal) 12. [Forget octal, that hasn't been widely used
since the PDP-11.]

As keyboard shortcuts on the teletype, you could enter the first 26
characters ("control" characters, which didn't produce any mark on the
paper) by holding the Control key and pressing a letter key. Ctrl+A is ASCII
1, Ctrl+B is ASCII 2, etc. Since L is the 12th character of the alphabet,
Ctrl+L (written shorthand as ^L) produces a form feed.

For additional confusion, you throw in the symbols used by Word's
Find/Replace dialog. These have *NO* relation to ASCII control character
codes. Using ^m for a manual page break doesn't mean that Ctrl+M has
anything to do with it -- in fact, the ^ here means an actual caret
character, not "Control". (I think the developers picked ^m because of the m
in "manual".)

As an example to show that ASCII 12 is a page break, run this little macro
and look at the resulting document in Normal view (where you can see the
break as a dashed line labeled "Page Break"):

Sub Sample()
Dim strString As String
strString = "Page 1" & Chr(12) & "Page 2"
Selection.InsertAfter strString
End Sub


If your merge source contains a (decimal) ASCII 12 character and you can
manage to get that character into the result of your merge field, you will
get a page break. If you can't do that, then you could include some unique
character string instead -- something like "&&%%&&" -- and then have a
simple macro, which you run after the merge is finished, to replace that
string with a page break (and here you *would* use ^m).

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://www.mvps.org/word

0 new messages