VB to find & replace within a set of records

P

Pete

Access community:
I need a piece of code that looks through some Word documents containing
records. These are of variable length and with varying headings, but each one
begins: Record:
A single example may establish the principle that I hope to apply to several
other headings:
Begin at start of document; Find: Record then Find: ISBN. Replace this with
^pISBN:
Find next Record then find: ISBN. Replace this with ^pISBN:
Do this to the end of the document.
My VB is very basic so please be specific. Thanks.
P.S. Simple Find and Replace doesn't do the task required.
 
D

Doug Robbins - Word MVP on news.microsoft.com

Unless there is something that you are not telling us, there is no reason
why you cannot use Edit>Replace to replace

Record: some text ISBN [ISBN Number assumed]

with

Record: some text¶
ISBN: [ISBN Number assumed]

for all instances of ISBN in the document.

--
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, originally posted via msnews.microsoft.com
 
P

Pete

The overall task needing done is complex, seeking to import the records into
a database that already functions well. Essentially the Records have to be
given column headings that lend to importing the data. This I can do.
However, many of the records have multiple duplicate headings which I can
integrate together and then import if I have the VB originally requested. The
simple Find and Replace would still leave me with duplicates of e.g., ISBN
whereas the VB for this item would push all the ISBN's into a little
paragraph that I can then pick up in the database. There are many other
duplicate headings but I am trying to get the principle operating first, then
I can apply it to the rest. I would be most grateful for this help.

Doug Robbins - Word MVP on news.microsof said:
Unless there is something that you are not telling us, there is no reason
why you cannot use Edit>Replace to replace

Record: some text ISBN [ISBN Number assumed]

with

Record: some text¶
ISBN: [ISBN Number assumed]

for all instances of ISBN in the document.

--
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, originally posted via msnews.microsoft.com

Pete said:
Access community:
I need a piece of code that looks through some Word documents containing
records. These are of variable length and with varying headings, but each
one
begins: Record:
A single example may establish the principle that I hope to apply to
several
other headings:
Begin at start of document; Find: Record then Find: ISBN. Replace this
with
^pISBN:
Find next Record then find: ISBN. Replace this with ^pISBN:
Do this to the end of the document.
My VB is very basic so please be specific. Thanks.
P.S. Simple Find and Replace doesn't do the task required.
 
D

Doug Robbins - Word MVP on news.microsoft.com

What you are now describing is completely different to your original post
and I would suggest that in all probability, you are trying to go about it
the wrong way.

You would need to give more precise, detailed information on what you are
starting with to facilitate providing more assistance.

--
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, originally posted via msnews.microsoft.com

Pete said:
The overall task needing done is complex, seeking to import the records
into
a database that already functions well. Essentially the Records have to be
given column headings that lend to importing the data. This I can do.
However, many of the records have multiple duplicate headings which I can
integrate together and then import if I have the VB originally requested.
The
simple Find and Replace would still leave me with duplicates of e.g., ISBN
whereas the VB for this item would push all the ISBN's into a little
paragraph that I can then pick up in the database. There are many other
duplicate headings but I am trying to get the principle operating first,
then
I can apply it to the rest. I would be most grateful for this help.

Doug Robbins - Word MVP on news.microsof said:
Unless there is something that you are not telling us, there is no reason
why you cannot use Edit>Replace to replace

Record: some text ISBN [ISBN Number assumed]

with

Record: some text¶
ISBN: [ISBN Number assumed]

for all instances of ISBN in the document.

--
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, originally posted via msnews.microsoft.com

Pete said:
Access community:
I need a piece of code that looks through some Word documents
containing
records. These are of variable length and with varying headings, but
each
one
begins: Record:
A single example may establish the principle that I hope to apply to
several
other headings:
Begin at start of document; Find: Record then Find: ISBN. Replace this
with
^pISBN:
Find next Record then find: ISBN. Replace this with ^pISBN:
Do this to the end of the document.
My VB is very basic so please be specific. Thanks.
P.S. Simple Find and Replace doesn't do the task required.
 
P

Pete

Thanks for your consideration. I concede a higher skill set would find a
better route, but the original question asked is a manageable bite from which
I can construct all I need to do. I provide a (shortened) couple of Records
towards finding a better way, but failing that I would so appreciate what I
first asked. Duplicate headings cause the import to fail for that field.
Changing the data manually has been tested and achieves the objective but a
set of records of many pages & numerous different duplications call for a
macro. Many thanks for your time.

Date : 03/08/2009

Record Number:R 1
Type of Material: BK
Date & Time Last Tr 20060522140914.0
LC Control No.: 2005056133
ISBN: 159030313X (alk. paper)
LC Classification: N 6537 .M473 L57 2006
Dewey Class No.: 769.92 22
Personal Name: Lipsey, Roger, 1942-
Main Title: Angelic mistakes : the art of Thomas Merton / Roger Lipsey ;
foreword by Paul M. Pearson.
Edition Information: 1st ed.
Published/Created:(I Boston, Mass. : New Seeds ; [New York] :
Description:xvii, 197 p. : ill. ; 24 cm.
Notes: Includes bibliographical references (p. 187-190) and index.##
Subjects: Merton, Thomas, 1915-1968 -- Criticism and interpretation.
Subjects: Christian art and symbolism.
Subjects: Art, Zen -- Influence.
Related Names: Merton, Thomas, 1915-1968.


Record Number:R 2
Type of Material: BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.: 90021430
ISBN: 0943221099 : $40.00
ISBN: 0943221102 (pbk.) : $19.95
System Control No. (OCoLC)22662907
System Control No. ADY2039
LC Classification: BX4705.M542 M36 1991
Dewey Class No.: 271/.12502 20
Personal Name: Meatyard, Ralph Eugene, 1925-1972.
Main Title: Father Louie : photographs of Thomas Merton / by Ralph Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(I New York : Timken Publishers, 1991.
Description:103 p. : chiefly ill. ; 26 cm.
Subjects: Merton, Thomas, 1915-1968.
Subjects: Merton, Thomas, 1915-1968 -- Pictorial works.
Subjects: Merton, Thomas, 1915-1968 -- Correspondence.
Subjects: Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names: Davenport, Guy.
Sys.No. 000869448





Doug Robbins - Word MVP on news.microsof said:
What you are now describing is completely different to your original post
and I would suggest that in all probability, you are trying to go about it
the wrong way.

You would need to give more precise, detailed information on what you are
starting with to facilitate providing more assistance.

--
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, originally posted via msnews.microsoft.com

Pete said:
The overall task needing done is complex, seeking to import the records
into
a database that already functions well. Essentially the Records have to be
given column headings that lend to importing the data. This I can do.
However, many of the records have multiple duplicate headings which I can
integrate together and then import if I have the VB originally requested.
The
simple Find and Replace would still leave me with duplicates of e.g., ISBN
whereas the VB for this item would push all the ISBN's into a little
paragraph that I can then pick up in the database. There are many other
duplicate headings but I am trying to get the principle operating first,
then
I can apply it to the rest. I would be most grateful for this help.

Doug Robbins - Word MVP on news.microsof said:
Unless there is something that you are not telling us, there is no reason
why you cannot use Edit>Replace to replace

Record: some text ISBN [ISBN Number assumed]

with

Record: some text¶
ISBN: [ISBN Number assumed]

for all instances of ISBN in the document.

--
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, originally posted via msnews.microsoft.com

Access community:
I need a piece of code that looks through some Word documents
containing
records. These are of variable length and with varying headings, but
each
one
begins: Record:
A single example may establish the principle that I hope to apply to
several
other headings:
Begin at start of document; Find: Record then Find: ISBN. Replace this
with
^pISBN:
Find next Record then find: ISBN. Replace this with ^pISBN:
Do this to the end of the document.
My VB is very basic so please be specific. Thanks.
P.S. Simple Find and Replace doesn't do the task required.
 
D

Doug Robbins - Word MVP on news.microsoft.com

Thanks for showing us what you are starting with. Can you now show us (or
describe to us) what you want to end up with, which I assume is to insert
some of the information into the relevant fields of a table in an Access
database.

Please make it what you want to end up with, not how you are trying to go
about it.

--
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, originally posted via msnews.microsoft.com

Pete said:
Thanks for your consideration. I concede a higher skill set would find a
better route, but the original question asked is a manageable bite from
which
I can construct all I need to do. I provide a (shortened) couple of
Records
towards finding a better way, but failing that I would so appreciate what
I
first asked. Duplicate headings cause the import to fail for that field.
Changing the data manually has been tested and achieves the objective but
a
set of records of many pages & numerous different duplications call for a
macro. Many thanks for your time.

Date : 03/08/2009

Record Number:R 1
Type of Material: BK
Date & Time Last Tr 20060522140914.0
LC Control No.: 2005056133
ISBN: 159030313X (alk. paper)
LC Classification: N 6537 .M473 L57 2006
Dewey Class No.: 769.92 22
Personal Name: Lipsey, Roger, 1942-
Main Title: Angelic mistakes : the art of Thomas Merton / Roger Lipsey ;
foreword by Paul M. Pearson.
Edition Information: 1st ed.
Published/Created:(I Boston, Mass. : New Seeds ; [New York] :
Description:xvii, 197 p. : ill. ; 24 cm.
Notes: Includes bibliographical references (p. 187-190) and index.##
Subjects: Merton, Thomas, 1915-1968 -- Criticism and interpretation.
Subjects: Christian art and symbolism.
Subjects: Art, Zen -- Influence.
Related Names: Merton, Thomas, 1915-1968.


Record Number:R 2
Type of Material: BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.: 90021430
ISBN: 0943221099 : $40.00
ISBN: 0943221102 (pbk.) : $19.95
System Control No. (OCoLC)22662907
System Control No. ADY2039
LC Classification: BX4705.M542 M36 1991
Dewey Class No.: 271/.12502 20
Personal Name: Meatyard, Ralph Eugene, 1925-1972.
Main Title: Father Louie : photographs of Thomas Merton / by Ralph Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(I New York : Timken Publishers, 1991.
Description:103 p. : chiefly ill. ; 26 cm.
Subjects: Merton, Thomas, 1915-1968.
Subjects: Merton, Thomas, 1915-1968 -- Pictorial works.
Subjects: Merton, Thomas, 1915-1968 -- Correspondence.
Subjects: Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names: Davenport, Guy.
Sys.No. 000869448





Doug Robbins - Word MVP on news.microsof said:
What you are now describing is completely different to your original post
and I would suggest that in all probability, you are trying to go about
it
the wrong way.

You would need to give more precise, detailed information on what you are
starting with to facilitate providing more assistance.

--
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, originally posted via msnews.microsoft.com

Pete said:
The overall task needing done is complex, seeking to import the records
into
a database that already functions well. Essentially the Records have to
be
given column headings that lend to importing the data. This I can do.
However, many of the records have multiple duplicate headings which I
can
integrate together and then import if I have the VB originally
requested.
The
simple Find and Replace would still leave me with duplicates of e.g.,
ISBN
whereas the VB for this item would push all the ISBN's into a little
paragraph that I can then pick up in the database. There are many other
duplicate headings but I am trying to get the principle operating
first,
then
I can apply it to the rest. I would be most grateful for this help.

:

Unless there is something that you are not telling us, there is no
reason
why you cannot use Edit>Replace to replace

Record: some text ISBN [ISBN Number assumed]

with

Record: some text¶
ISBN: [ISBN Number assumed]

for all instances of ISBN in the document.

--
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, originally posted via msnews.microsoft.com

Access community:
I need a piece of code that looks through some Word documents
containing
records. These are of variable length and with varying headings, but
each
one
begins: Record:
A single example may establish the principle that I hope to apply to
several
other headings:
Begin at start of document; Find: Record then Find: ISBN. Replace
this
with
^pISBN:
Find next Record then find: ISBN. Replace this with ^pISBN:
Do this to the end of the document.
My VB is very basic so please be specific. Thanks.
P.S. Simple Find and Replace doesn't do the task required.
 
P

Pete

Using the same example as previously, this is what that data would look like
in a format that can be pasted into Excel and imported into the Access
database. The Access Table headings equate with the first words of the
following e.g. Type of Material. Only desired headings are actually imported,
and the rest ignored.

Date :03/08/2009
Record Number:R1
Type of Material:BK
Date & Time Last Tr20060522140914.0
LC Control No.:2005056133
ISBN:159030313X (alk. paper)
LC Classification:N 6537 .M473 L57 2006
Dewey Class No.:769.92 22
Personal Name:Lipsey, Roger, 1942-
Main Title:Angelic mistakes :the art of Thomas Merton / Roger Lipsey ;
foreword by Paul M. Pearson.
Edition Information:1st ed.
Published/Created:(IBoston, Mass. :New Seeds ; [New York] :
Description:xvii, 197 p. :ill. ; 24 cm.
Notes:Includes bibliographical references (p. 187-190) and index.##
Subjects:Merton, Thomas, 1915-1968 -- Criticism and
interpretation.Subjects:Christian art and symbolism. Subjects:Art, Zen --
Influence.
Related Names:Merton, Thomas, 1915-1968.
Record Number:R2
Type of Material:BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.:90021430
ISBN:0943221099 :$40.00 ISBN:0943221102 (pbk.) :$19.95
System Control No. (OCoLC)22662907 System Control No. ADY2039
LC Classification:BX4705.M542 M36 1991 Dewey Class No.:271/.12502 20
Personal Name:Meatyard, Ralph Eugene, 1925-1972.
Main Title:Father Louie :photographs of Thomas Merton / by Ralph Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(INew York :Timken Publishers, 1991.
Description:103 p. :chiefly ill. ; 26 cm.
Subjects:Merton, Thomas, 1915-1968. Subjects:Merton, Thomas, 1915-1968 --
Pictorial works. Subjects:Merton, Thomas, 1915-1968 -- Correspondence.
Subjects:Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names:Davenport, Guy.
Sys.No.000869448



Doug Robbins - Word MVP on news.microsof said:
Thanks for showing us what you are starting with. Can you now show us (or
describe to us) what you want to end up with, which I assume is to insert
some of the information into the relevant fields of a table in an Access
database.

Please make it what you want to end up with, not how you are trying to go
about it.

--
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, originally posted via msnews.microsoft.com

Pete said:
Thanks for your consideration. I concede a higher skill set would find a
better route, but the original question asked is a manageable bite from
which
I can construct all I need to do. I provide a (shortened) couple of
Records
towards finding a better way, but failing that I would so appreciate what
I
first asked. Duplicate headings cause the import to fail for that field.
Changing the data manually has been tested and achieves the objective but
a
set of records of many pages & numerous different duplications call for a
macro. Many thanks for your time.

Date : 03/08/2009

Record Number:R 1
Type of Material: BK
Date & Time Last Tr 20060522140914.0
LC Control No.: 2005056133
ISBN: 159030313X (alk. paper)
LC Classification: N 6537 .M473 L57 2006
Dewey Class No.: 769.92 22
Personal Name: Lipsey, Roger, 1942-
Main Title: Angelic mistakes : the art of Thomas Merton / Roger Lipsey ;
foreword by Paul M. Pearson.
Edition Information: 1st ed.
Published/Created:(I Boston, Mass. : New Seeds ; [New York] :
Description:xvii, 197 p. : ill. ; 24 cm.
Notes: Includes bibliographical references (p. 187-190) and index.##
Subjects: Merton, Thomas, 1915-1968 -- Criticism and interpretation.
Subjects: Christian art and symbolism.
Subjects: Art, Zen -- Influence.
Related Names: Merton, Thomas, 1915-1968.


Record Number:R 2
Type of Material: BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.: 90021430
ISBN: 0943221099 : $40.00
ISBN: 0943221102 (pbk.) : $19.95
System Control No. (OCoLC)22662907
System Control No. ADY2039
LC Classification: BX4705.M542 M36 1991
Dewey Class No.: 271/.12502 20
Personal Name: Meatyard, Ralph Eugene, 1925-1972.
Main Title: Father Louie : photographs of Thomas Merton / by Ralph Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(I New York : Timken Publishers, 1991.
Description:103 p. : chiefly ill. ; 26 cm.
Subjects: Merton, Thomas, 1915-1968.
Subjects: Merton, Thomas, 1915-1968 -- Pictorial works.
Subjects: Merton, Thomas, 1915-1968 -- Correspondence.
Subjects: Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names: Davenport, Guy.
Sys.No. 000869448





Doug Robbins - Word MVP on news.microsof said:
What you are now describing is completely different to your original post
and I would suggest that in all probability, you are trying to go about
it
the wrong way.

You would need to give more precise, detailed information on what you are
starting with to facilitate providing more assistance.

--
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, originally posted via msnews.microsoft.com

The overall task needing done is complex, seeking to import the records
into
a database that already functions well. Essentially the Records have to
be
given column headings that lend to importing the data. This I can do.
However, many of the records have multiple duplicate headings which I
can
integrate together and then import if I have the VB originally
requested.
The
simple Find and Replace would still leave me with duplicates of e.g.,
ISBN
whereas the VB for this item would push all the ISBN's into a little
paragraph that I can then pick up in the database. There are many other
duplicate headings but I am trying to get the principle operating
first,
then
I can apply it to the rest. I would be most grateful for this help.

:

Unless there is something that you are not telling us, there is no
reason
why you cannot use Edit>Replace to replace

Record: some text ISBN [ISBN Number assumed]

with

Record: some text¶
ISBN: [ISBN Number assumed]

for all instances of ISBN in the document.

--
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, originally posted via msnews.microsoft.com

Access community:
I need a piece of code that looks through some Word documents
containing
records. These are of variable length and with varying headings, but
each
one
begins: Record:
A single example may establish the principle that I hope to apply to
several
other headings:
Begin at start of document; Find: Record then Find: ISBN. Replace
this
with
^pISBN:
Find next Record then find: ISBN. Replace this with ^pISBN:
Do this to the end of the document.
My VB is very basic so please be specific. Thanks.
P.S. Simple Find and Replace doesn't do the task required.
 
D

Doug Robbins - Word MVP on news.microsoft.com

I would not be pasting stuff into Excel and then importing it into Access
when it is quite feasible to develop some code to parse the original
documents and insert the required information directly into the fields of an
Access table.

That is why I suggested that you advise what you want to end up with, NOT
how your are trying to go about it.

--
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, originally posted via msnews.microsoft.com

Pete said:
Using the same example as previously, this is what that data would look
like
in a format that can be pasted into Excel and imported into the Access
database. The Access Table headings equate with the first words of the
following e.g. Type of Material. Only desired headings are actually
imported,
and the rest ignored.

Date :03/08/2009
Record Number:R1
Type of Material:BK
Date & Time Last Tr20060522140914.0
LC Control No.:2005056133
ISBN:159030313X (alk. paper)
LC Classification:N 6537 .M473 L57 2006
Dewey Class No.:769.92 22
Personal Name:Lipsey, Roger, 1942-
Main Title:Angelic mistakes :the art of Thomas Merton / Roger Lipsey ;
foreword by Paul M. Pearson.
Edition Information:1st ed.
Published/Created:(IBoston, Mass. :New Seeds ; [New York] :
Description:xvii, 197 p. :ill. ; 24 cm.
Notes:Includes bibliographical references (p. 187-190) and index.##
Subjects:Merton, Thomas, 1915-1968 -- Criticism and
interpretation.Subjects:Christian art and symbolism. Subjects:Art, Zen --
Influence.
Related Names:Merton, Thomas, 1915-1968.
Record Number:R2
Type of Material:BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.:90021430
ISBN:0943221099 :$40.00 ISBN:0943221102 (pbk.) :$19.95
System Control No. (OCoLC)22662907 System Control No. ADY2039
LC Classification:BX4705.M542 M36 1991 Dewey Class No.:271/.12502 20
Personal Name:Meatyard, Ralph Eugene, 1925-1972.
Main Title:Father Louie :photographs of Thomas Merton / by Ralph Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(INew York :Timken Publishers, 1991.
Description:103 p. :chiefly ill. ; 26 cm.
Subjects:Merton, Thomas, 1915-1968. Subjects:Merton, Thomas, 1915-1968 --
Pictorial works. Subjects:Merton, Thomas, 1915-1968 -- Correspondence.
Subjects:Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names:Davenport, Guy.
Sys.No.000869448



Doug Robbins - Word MVP on news.microsof said:
Thanks for showing us what you are starting with. Can you now show us
(or
describe to us) what you want to end up with, which I assume is to insert
some of the information into the relevant fields of a table in an Access
database.

Please make it what you want to end up with, not how you are trying to go
about it.

--
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, originally posted via msnews.microsoft.com

Pete said:
Thanks for your consideration. I concede a higher skill set would find
a
better route, but the original question asked is a manageable bite from
which
I can construct all I need to do. I provide a (shortened) couple of
Records
towards finding a better way, but failing that I would so appreciate
what
I
first asked. Duplicate headings cause the import to fail for that
field.
Changing the data manually has been tested and achieves the objective
but
a
set of records of many pages & numerous different duplications call for
a
macro. Many thanks for your time.

Date : 03/08/2009

Record Number:R 1
Type of Material: BK
Date & Time Last Tr 20060522140914.0
LC Control No.: 2005056133
ISBN: 159030313X (alk. paper)
LC Classification: N 6537 .M473 L57 2006
Dewey Class No.: 769.92 22
Personal Name: Lipsey, Roger, 1942-
Main Title: Angelic mistakes : the art of Thomas Merton / Roger Lipsey
;
foreword by Paul M. Pearson.
Edition Information: 1st ed.
Published/Created:(I Boston, Mass. : New Seeds ; [New York] :
Description:xvii, 197 p. : ill. ; 24 cm.
Notes: Includes bibliographical references (p. 187-190) and index.##
Subjects: Merton, Thomas, 1915-1968 -- Criticism and interpretation.
Subjects: Christian art and symbolism.
Subjects: Art, Zen -- Influence.
Related Names: Merton, Thomas, 1915-1968.


Record Number:R 2
Type of Material: BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.: 90021430
ISBN: 0943221099 : $40.00
ISBN: 0943221102 (pbk.) : $19.95
System Control No. (OCoLC)22662907
System Control No. ADY2039
LC Classification: BX4705.M542 M36 1991
Dewey Class No.: 271/.12502 20
Personal Name: Meatyard, Ralph Eugene, 1925-1972.
Main Title: Father Louie : photographs of Thomas Merton / by Ralph
Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(I New York : Timken Publishers, 1991.
Description:103 p. : chiefly ill. ; 26 cm.
Subjects: Merton, Thomas, 1915-1968.
Subjects: Merton, Thomas, 1915-1968 -- Pictorial works.
Subjects: Merton, Thomas, 1915-1968 -- Correspondence.
Subjects: Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names: Davenport, Guy.
Sys.No. 000869448





:

What you are now describing is completely different to your original
post
and I would suggest that in all probability, you are trying to go
about
it
the wrong way.

You would need to give more precise, detailed information on what you
are
starting with to facilitate providing more assistance.

--
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, originally posted via msnews.microsoft.com

The overall task needing done is complex, seeking to import the
records
into
a database that already functions well. Essentially the Records have
to
be
given column headings that lend to importing the data. This I can
do.
However, many of the records have multiple duplicate headings which
I
can
integrate together and then import if I have the VB originally
requested.
The
simple Find and Replace would still leave me with duplicates of
e.g.,
ISBN
whereas the VB for this item would push all the ISBN's into a little
paragraph that I can then pick up in the database. There are many
other
duplicate headings but I am trying to get the principle operating
first,
then
I can apply it to the rest. I would be most grateful for this help.

:

Unless there is something that you are not telling us, there is no
reason
why you cannot use Edit>Replace to replace

Record: some text ISBN [ISBN Number assumed]

with

Record: some text¶
ISBN: [ISBN Number assumed]

for all instances of ISBN in the document.

--
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, originally posted via msnews.microsoft.com

Access community:
I need a piece of code that looks through some Word documents
containing
records. These are of variable length and with varying headings,
but
each
one
begins: Record:
A single example may establish the principle that I hope to apply
to
several
other headings:
Begin at start of document; Find: Record then Find: ISBN. Replace
this
with
^pISBN:
Find next Record then find: ISBN. Replace this with ^pISBN:
Do this to the end of the document.
My VB is very basic so please be specific. Thanks.
P.S. Simple Find and Replace doesn't do the task required.
 
P

Pete

Your point is valid and clear. For the future, honest endeavour will be made
to achieve greater skills so as to be able to do as you suggest. Pragmatic
decision for today leads to asking that original request be met if at all
possible. I would have thought major work was beyond the scope of the Forum,
while request for a small piece of code was acceptable. I hope I am not
misunderstanding this, and am certainly appreciative of any help given.

Doug Robbins - Word MVP on news.microsof said:
I would not be pasting stuff into Excel and then importing it into Access
when it is quite feasible to develop some code to parse the original
documents and insert the required information directly into the fields of an
Access table.

That is why I suggested that you advise what you want to end up with, NOT
how your are trying to go about it.

--
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, originally posted via msnews.microsoft.com

Pete said:
Using the same example as previously, this is what that data would look
like
in a format that can be pasted into Excel and imported into the Access
database. The Access Table headings equate with the first words of the
following e.g. Type of Material. Only desired headings are actually
imported,
and the rest ignored.

Date :03/08/2009
Record Number:R1
Type of Material:BK
Date & Time Last Tr20060522140914.0
LC Control No.:2005056133
ISBN:159030313X (alk. paper)
LC Classification:N 6537 .M473 L57 2006
Dewey Class No.:769.92 22
Personal Name:Lipsey, Roger, 1942-
Main Title:Angelic mistakes :the art of Thomas Merton / Roger Lipsey ;
foreword by Paul M. Pearson.
Edition Information:1st ed.
Published/Created:(IBoston, Mass. :New Seeds ; [New York] :
Description:xvii, 197 p. :ill. ; 24 cm.
Notes:Includes bibliographical references (p. 187-190) and index.##
Subjects:Merton, Thomas, 1915-1968 -- Criticism and
interpretation.Subjects:Christian art and symbolism. Subjects:Art, Zen --
Influence.
Related Names:Merton, Thomas, 1915-1968.
Record Number:R2
Type of Material:BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.:90021430
ISBN:0943221099 :$40.00 ISBN:0943221102 (pbk.) :$19.95
System Control No. (OCoLC)22662907 System Control No. ADY2039
LC Classification:BX4705.M542 M36 1991 Dewey Class No.:271/.12502 20
Personal Name:Meatyard, Ralph Eugene, 1925-1972.
Main Title:Father Louie :photographs of Thomas Merton / by Ralph Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(INew York :Timken Publishers, 1991.
Description:103 p. :chiefly ill. ; 26 cm.
Subjects:Merton, Thomas, 1915-1968. Subjects:Merton, Thomas, 1915-1968 --
Pictorial works. Subjects:Merton, Thomas, 1915-1968 -- Correspondence.
Subjects:Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names:Davenport, Guy.
Sys.No.000869448



Doug Robbins - Word MVP on news.microsof said:
Thanks for showing us what you are starting with. Can you now show us
(or
describe to us) what you want to end up with, which I assume is to insert
some of the information into the relevant fields of a table in an Access
database.

Please make it what you want to end up with, not how you are trying to go
about it.

--
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, originally posted via msnews.microsoft.com

Thanks for your consideration. I concede a higher skill set would find
a
better route, but the original question asked is a manageable bite from
which
I can construct all I need to do. I provide a (shortened) couple of
Records
towards finding a better way, but failing that I would so appreciate
what
I
first asked. Duplicate headings cause the import to fail for that
field.
Changing the data manually has been tested and achieves the objective
but
a
set of records of many pages & numerous different duplications call for
a
macro. Many thanks for your time.

Date : 03/08/2009

Record Number:R 1
Type of Material: BK
Date & Time Last Tr 20060522140914.0
LC Control No.: 2005056133
ISBN: 159030313X (alk. paper)
LC Classification: N 6537 .M473 L57 2006
Dewey Class No.: 769.92 22
Personal Name: Lipsey, Roger, 1942-
Main Title: Angelic mistakes : the art of Thomas Merton / Roger Lipsey
;
foreword by Paul M. Pearson.
Edition Information: 1st ed.
Published/Created:(I Boston, Mass. : New Seeds ; [New York] :
Description:xvii, 197 p. : ill. ; 24 cm.
Notes: Includes bibliographical references (p. 187-190) and index.##
Subjects: Merton, Thomas, 1915-1968 -- Criticism and interpretation.
Subjects: Christian art and symbolism.
Subjects: Art, Zen -- Influence.
Related Names: Merton, Thomas, 1915-1968.


Record Number:R 2
Type of Material: BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.: 90021430
ISBN: 0943221099 : $40.00
ISBN: 0943221102 (pbk.) : $19.95
System Control No. (OCoLC)22662907
System Control No. ADY2039
LC Classification: BX4705.M542 M36 1991
Dewey Class No.: 271/.12502 20
Personal Name: Meatyard, Ralph Eugene, 1925-1972.
Main Title: Father Louie : photographs of Thomas Merton / by Ralph
Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(I New York : Timken Publishers, 1991.
Description:103 p. : chiefly ill. ; 26 cm.
Subjects: Merton, Thomas, 1915-1968.
Subjects: Merton, Thomas, 1915-1968 -- Pictorial works.
Subjects: Merton, Thomas, 1915-1968 -- Correspondence.
Subjects: Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names: Davenport, Guy.
Sys.No. 000869448





:

What you are now describing is completely different to your original
post
and I would suggest that in all probability, you are trying to go
about
it
the wrong way.

You would need to give more precise, detailed information on what you
are
starting with to facilitate providing more assistance.

--
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, originally posted via msnews.microsoft.com

The overall task needing done is complex, seeking to import the
records
into
a database that already functions well. Essentially the Records have
to
be
given column headings that lend to importing the data. This I can
do.
However, many of the records have multiple duplicate headings which
I
can
integrate together and then import if I have the VB originally
requested.
The
simple Find and Replace would still leave me with duplicates of
e.g.,
ISBN
whereas the VB for this item would push all the ISBN's into a little
paragraph that I can then pick up in the database. There are many
other
duplicate headings but I am trying to get the principle operating
first,
then
I can apply it to the rest. I would be most grateful for this help.

:

Unless there is something that you are not telling us, there is no
reason
why you cannot use Edit>Replace to replace

Record: some text ISBN [ISBN Number assumed]

with

Record: some text¶
ISBN: [ISBN Number assumed]

for all instances of ISBN in the document.

--
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, originally posted via msnews.microsoft.com

Access community:
I need a piece of code that looks through some Word documents
containing
records. These are of variable length and with varying headings,
but
each
one
begins: Record:
A single example may establish the principle that I hope to apply
to
several
other headings:
Begin at start of document; Find: Record then Find: ISBN. Replace
this
with
^pISBN:
Find next Record then find: ISBN. Replace this with ^pISBN:
Do this to the end of the document.
My VB is very basic so please be specific. Thanks.
P.S. Simple Find and Replace doesn't do the task required.
 
D

Doug Robbins - Word MVP on news.microsoft.com

If I understand your first post correctly, you want to find ISBN and
inserted Carriage Return in front of it (^pISBN)

Seems to me however that is what it already has and in your post in which
you give what you say can be pasted into Excel, the record No 2 that
contained two ISBN's on separate lines assumed to be paragraphs) has those
two ISBN's on the one line.

Maybe I just don't understand.

--
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, originally posted via msnews.microsoft.com

Pete said:
Your point is valid and clear. For the future, honest endeavour will be
made
to achieve greater skills so as to be able to do as you suggest.
Pragmatic
decision for today leads to asking that original request be met if at all
possible. I would have thought major work was beyond the scope of the
Forum,
while request for a small piece of code was acceptable. I hope I am not
misunderstanding this, and am certainly appreciative of any help given.

Doug Robbins - Word MVP on news.microsof said:
I would not be pasting stuff into Excel and then importing it into Access
when it is quite feasible to develop some code to parse the original
documents and insert the required information directly into the fields of
an
Access table.

That is why I suggested that you advise what you want to end up with, NOT
how your are trying to go about it.

--
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, originally posted via msnews.microsoft.com

Pete said:
Using the same example as previously, this is what that data would look
like
in a format that can be pasted into Excel and imported into the Access
database. The Access Table headings equate with the first words of the
following e.g. Type of Material. Only desired headings are actually
imported,
and the rest ignored.

Date :03/08/2009
Record Number:R1
Type of Material:BK
Date & Time Last Tr20060522140914.0
LC Control No.:2005056133
ISBN:159030313X (alk. paper)
LC Classification:N 6537 .M473 L57 2006
Dewey Class No.:769.92 22
Personal Name:Lipsey, Roger, 1942-
Main Title:Angelic mistakes :the art of Thomas Merton / Roger Lipsey ;
foreword by Paul M. Pearson.
Edition Information:1st ed.
Published/Created:(IBoston, Mass. :New Seeds ; [New York] :
Description:xvii, 197 p. :ill. ; 24 cm.
Notes:Includes bibliographical references (p. 187-190) and index.##
Subjects:Merton, Thomas, 1915-1968 -- Criticism and
interpretation.Subjects:Christian art and symbolism. Subjects:Art,
Zen --
Influence.
Related Names:Merton, Thomas, 1915-1968.
Record Number:R2
Type of Material:BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.:90021430
ISBN:0943221099 :$40.00 ISBN:0943221102 (pbk.) :$19.95
System Control No. (OCoLC)22662907 System Control No. ADY2039
LC Classification:BX4705.M542 M36 1991 Dewey Class No.:271/.12502 20
Personal Name:Meatyard, Ralph Eugene, 1925-1972.
Main Title:Father Louie :photographs of Thomas Merton / by Ralph Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(INew York :Timken Publishers, 1991.
Description:103 p. :chiefly ill. ; 26 cm.
Subjects:Merton, Thomas, 1915-1968. Subjects:Merton, Thomas,
1915-1968 --
Pictorial works. Subjects:Merton, Thomas, 1915-1968 -- Correspondence.
Subjects:Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names:Davenport, Guy.
Sys.No.000869448



:

Thanks for showing us what you are starting with. Can you now show us
(or
describe to us) what you want to end up with, which I assume is to
insert
some of the information into the relevant fields of a table in an
Access
database.

Please make it what you want to end up with, not how you are trying to
go
about it.

--
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, originally posted via msnews.microsoft.com

Thanks for your consideration. I concede a higher skill set would
find
a
better route, but the original question asked is a manageable bite
from
which
I can construct all I need to do. I provide a (shortened) couple of
Records
towards finding a better way, but failing that I would so appreciate
what
I
first asked. Duplicate headings cause the import to fail for that
field.
Changing the data manually has been tested and achieves the
objective
but
a
set of records of many pages & numerous different duplications call
for
a
macro. Many thanks for your time.

Date : 03/08/2009

Record Number:R 1
Type of Material: BK
Date & Time Last Tr 20060522140914.0
LC Control No.: 2005056133
ISBN: 159030313X (alk. paper)
LC Classification: N 6537 .M473 L57 2006
Dewey Class No.: 769.92 22
Personal Name: Lipsey, Roger, 1942-
Main Title: Angelic mistakes : the art of Thomas Merton / Roger
Lipsey
;
foreword by Paul M. Pearson.
Edition Information: 1st ed.
Published/Created:(I Boston, Mass. : New Seeds ; [New York] :
Description:xvii, 197 p. : ill. ; 24 cm.
Notes: Includes bibliographical references (p. 187-190) and
index.##
Subjects: Merton, Thomas, 1915-1968 -- Criticism and
interpretation.
Subjects: Christian art and symbolism.
Subjects: Art, Zen -- Influence.
Related Names: Merton, Thomas, 1915-1968.


Record Number:R 2
Type of Material: BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.: 90021430
ISBN: 0943221099 : $40.00
ISBN: 0943221102 (pbk.) : $19.95
System Control No. (OCoLC)22662907
System Control No. ADY2039
LC Classification: BX4705.M542 M36 1991
Dewey Class No.: 271/.12502 20
Personal Name: Meatyard, Ralph Eugene, 1925-1972.
Main Title: Father Louie : photographs of Thomas Merton / by Ralph
Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(I New York : Timken Publishers, 1991.
Description:103 p. : chiefly ill. ; 26 cm.
Subjects: Merton, Thomas, 1915-1968.
Subjects: Merton, Thomas, 1915-1968 -- Pictorial works.
Subjects: Merton, Thomas, 1915-1968 -- Correspondence.
Subjects: Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names: Davenport, Guy.
Sys.No. 000869448





:

What you are now describing is completely different to your
original
post
and I would suggest that in all probability, you are trying to go
about
it
the wrong way.

You would need to give more precise, detailed information on what
you
are
starting with to facilitate providing more assistance.

--
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, originally posted via msnews.microsoft.com

The overall task needing done is complex, seeking to import the
records
into
a database that already functions well. Essentially the Records
have
to
be
given column headings that lend to importing the data. This I can
do.
However, many of the records have multiple duplicate headings
which
I
can
integrate together and then import if I have the VB originally
requested.
The
simple Find and Replace would still leave me with duplicates of
e.g.,
ISBN
whereas the VB for this item would push all the ISBN's into a
little
paragraph that I can then pick up in the database. There are many
other
duplicate headings but I am trying to get the principle operating
first,
then
I can apply it to the rest. I would be most grateful for this
help.

:

Unless there is something that you are not telling us, there is
no
reason
why you cannot use Edit>Replace to replace

Record: some text ISBN [ISBN Number assumed]

with

Record: some text¶
ISBN: [ISBN Number assumed]

for all instances of ISBN in the document.

--
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, originally posted via
msnews.microsoft.com

Access community:
I need a piece of code that looks through some Word documents
containing
records. These are of variable length and with varying
headings,
but
each
one
begins: Record:
A single example may establish the principle that I hope to
apply
to
several
other headings:
Begin at start of document; Find: Record then Find: ISBN.
Replace
this
with
^pISBN:
Find next Record then find: ISBN. Replace this with ^pISBN:
Do this to the end of the document.
My VB is very basic so please be specific. Thanks.
P.S. Simple Find and Replace doesn't do the task required.
 
P

Pete

Sorry if I haven’t been clear: Here it is step by step.
You will notice that within each Record it will only find ISBN once because
then it goes on to the next Record. There may be 100 records of variable
length and order of headings.

1. Begin at start of document
2. Find: Record then
3. Find: ISBN Replace this with ^pISBN: (i.e. a new blank line is
thereby inserted above ISBN and a colon:)) is added to ISBN
4. Find next Record then
5. Find: ISBN Replace this with ^pISBN:
6. Do this to the end of the document (may be several pages).

Before Code is applied After Code is applied
Record 1 Record 1
Type of Material: Bk Type of Material: Bk
ISBN 1234
ISBN 3456 ISBN: 1234
ISBN 3456

Record 2 Record 2
Dewey Decimal Call 769.92 22 Dewey Decimal Call 769.92 22

ISBN 6789
ISBN: 6789

etc

Above is supposed to be in 2 columns to illustrate change after code is run.
Later, any duplicate headings (here it is ISBN in Record 1) are
automatically joined together with their data in one line through the process
already operating.



Doug Robbins - Word MVP on news.microsof said:
If I understand your first post correctly, you want to find ISBN and
inserted Carriage Return in front of it (^pISBN)

Seems to me however that is what it already has and in your post in which
you give what you say can be pasted into Excel, the record No 2 that
contained two ISBN's on separate lines assumed to be paragraphs) has those
two ISBN's on the one line.

Maybe I just don't understand.

--
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, originally posted via msnews.microsoft.com

Pete said:
Your point is valid and clear. For the future, honest endeavour will be
made
to achieve greater skills so as to be able to do as you suggest.
Pragmatic
decision for today leads to asking that original request be met if at all
possible. I would have thought major work was beyond the scope of the
Forum,
while request for a small piece of code was acceptable. I hope I am not
misunderstanding this, and am certainly appreciative of any help given.

Doug Robbins - Word MVP on news.microsof said:
I would not be pasting stuff into Excel and then importing it into Access
when it is quite feasible to develop some code to parse the original
documents and insert the required information directly into the fields of
an
Access table.

That is why I suggested that you advise what you want to end up with, NOT
how your are trying to go about it.

--
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, originally posted via msnews.microsoft.com

Using the same example as previously, this is what that data would look
like
in a format that can be pasted into Excel and imported into the Access
database. The Access Table headings equate with the first words of the
following e.g. Type of Material. Only desired headings are actually
imported,
and the rest ignored.

Date :03/08/2009
Record Number:R1
Type of Material:BK
Date & Time Last Tr20060522140914.0
LC Control No.:2005056133
ISBN:159030313X (alk. paper)
LC Classification:N 6537 .M473 L57 2006
Dewey Class No.:769.92 22
Personal Name:Lipsey, Roger, 1942-
Main Title:Angelic mistakes :the art of Thomas Merton / Roger Lipsey ;
foreword by Paul M. Pearson.
Edition Information:1st ed.
Published/Created:(IBoston, Mass. :New Seeds ; [New York] :
Description:xvii, 197 p. :ill. ; 24 cm.
Notes:Includes bibliographical references (p. 187-190) and index.##
Subjects:Merton, Thomas, 1915-1968 -- Criticism and
interpretation.Subjects:Christian art and symbolism. Subjects:Art,
Zen --
Influence.
Related Names:Merton, Thomas, 1915-1968.
Record Number:R2
Type of Material:BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.:90021430
ISBN:0943221099 :$40.00 ISBN:0943221102 (pbk.) :$19.95
System Control No. (OCoLC)22662907 System Control No. ADY2039
LC Classification:BX4705.M542 M36 1991 Dewey Class No.:271/.12502 20
Personal Name:Meatyard, Ralph Eugene, 1925-1972.
Main Title:Father Louie :photographs of Thomas Merton / by Ralph Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(INew York :Timken Publishers, 1991.
Description:103 p. :chiefly ill. ; 26 cm.
Subjects:Merton, Thomas, 1915-1968. Subjects:Merton, Thomas,
1915-1968 --
Pictorial works. Subjects:Merton, Thomas, 1915-1968 -- Correspondence.
Subjects:Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names:Davenport, Guy.
Sys.No.000869448



:

Thanks for showing us what you are starting with. Can you now show us
(or
describe to us) what you want to end up with, which I assume is to
insert
some of the information into the relevant fields of a table in an
Access
database.

Please make it what you want to end up with, not how you are trying to
go
about it.

--
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, originally posted via msnews.microsoft.com

Thanks for your consideration. I concede a higher skill set would
find
a
better route, but the original question asked is a manageable bite
from
which
I can construct all I need to do. I provide a (shortened) couple of
Records
towards finding a better way, but failing that I would so appreciate
what
I
first asked. Duplicate headings cause the import to fail for that
field.
Changing the data manually has been tested and achieves the
objective
but
a
set of records of many pages & numerous different duplications call
for
a
macro. Many thanks for your time.

Date : 03/08/2009

Record Number:R 1
Type of Material: BK
Date & Time Last Tr 20060522140914.0
LC Control No.: 2005056133
ISBN: 159030313X (alk. paper)
LC Classification: N 6537 .M473 L57 2006
Dewey Class No.: 769.92 22
Personal Name: Lipsey, Roger, 1942-
Main Title: Angelic mistakes : the art of Thomas Merton / Roger
Lipsey
;
foreword by Paul M. Pearson.
Edition Information: 1st ed.
Published/Created:(I Boston, Mass. : New Seeds ; [New York] :
Description:xvii, 197 p. : ill. ; 24 cm.
Notes: Includes bibliographical references (p. 187-190) and
index.##
Subjects: Merton, Thomas, 1915-1968 -- Criticism and
interpretation.
Subjects: Christian art and symbolism.
Subjects: Art, Zen -- Influence.
Related Names: Merton, Thomas, 1915-1968.


Record Number:R 2
Type of Material: BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.: 90021430
ISBN: 0943221099 : $40.00
ISBN: 0943221102 (pbk.) : $19.95
System Control No. (OCoLC)22662907
System Control No. ADY2039
LC Classification: BX4705.M542 M36 1991
Dewey Class No.: 271/.12502 20
Personal Name: Meatyard, Ralph Eugene, 1925-1972.
Main Title: Father Louie : photographs of Thomas Merton / by Ralph
Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(I New York : Timken Publishers, 1991.
Description:103 p. : chiefly ill. ; 26 cm.
Subjects: Merton, Thomas, 1915-1968.
Subjects: Merton, Thomas, 1915-1968 -- Pictorial works.
Subjects: Merton, Thomas, 1915-1968 -- Correspondence.
Subjects: Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names: Davenport, Guy.
Sys.No. 000869448





:

What you are now describing is completely different to your
original
post
and I would suggest that in all probability, you are trying to go
about
it
the wrong way.

You would need to give more precise, detailed information on what
you
are
starting with to facilitate providing more assistance.

--
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, originally posted via msnews.microsoft.com

The overall task needing done is complex, seeking to import the
records
into
a database that already functions well. Essentially the Records
have
to
be
given column headings that lend to importing the data. This I can
do.
However, many of the records have multiple duplicate headings
which
I
can
integrate together and then import if I have the VB originally
requested.
The
simple Find and Replace would still leave me with duplicates of
e.g.,
ISBN
whereas the VB for this item would push all the ISBN's into a
little
paragraph that I can then pick up in the database. There are many
other
duplicate headings but I am trying to get the principle operating
first,
then
I can apply it to the rest. I would be most grateful for this
help.

:

Unless there is something that you are not telling us, there is
no
reason
why you cannot use Edit>Replace to replace

Record: some text ISBN [ISBN Number assumed]

with

Record: some text¶
ISBN: [ISBN Number assumed]

for all instances of ISBN in the document.

--
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, originally posted via
msnews.microsoft.com

Access community:
I need a piece of code that looks through some Word documents
containing
records. These are of variable length and with varying
headings,
but
each
one
begins: Record:
A single example may establish the principle that I hope to
apply
to
several
other headings:
Begin at start of document; Find: Record then Find: ISBN.
Replace
this
 
D

Doug Robbins - Word MVP on news.microsoft.com

Sorry, but that example is different to the previous before and after that
you provided in your first and second message of 3/10/2009

Is what you want to do find the first ISBN in a record and insert an empty
paragraph before it but if there is a second ISBN, do nothing with it? (I
note that in the example records contained in your first post of 3/10/2009,
there is already a colon after each ISBN)

Ignoring the colon, the following code will insert an empty paragraph before
only the first instance of ISBN in a record:

Dim i As Long, j As Long
With ActiveDocument
j = .Paragraphs.Count
For i = 2 To j
If Left(.Paragraphs(i).Range, 4) = "ISBN" And Left(.Paragraphs(i -
1).Range, 4) <> "ISBN" Then
.Paragraphs(i).Range.InsertBefore vbCr
i = i + 1
j = j + 1
End If
Next i
End With


--
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, originally posted via msnews.microsoft.com

Pete said:
Sorry if I haven't been clear: Here it is step by step.
You will notice that within each Record it will only find ISBN once
because
then it goes on to the next Record. There may be 100 records of variable
length and order of headings.

1. Begin at start of document
2. Find: Record then
3. Find: ISBN Replace this with ^pISBN: (i.e. a new blank line is
thereby inserted above ISBN and a colon:)) is added to ISBN
4. Find next Record then
5. Find: ISBN Replace this with ^pISBN:
6. Do this to the end of the document (may be several pages).

Before Code is applied After Code is applied
Record 1 Record 1
Type of Material: Bk Type of Material: Bk
ISBN 1234
ISBN 3456 ISBN: 1234
ISBN 3456

Record 2 Record 2
Dewey Decimal Call 769.92 22 Dewey Decimal Call 769.92 22

ISBN 6789
ISBN: 6789

etc

Above is supposed to be in 2 columns to illustrate change after code is
run.
Later, any duplicate headings (here it is ISBN in Record 1) are
automatically joined together with their data in one line through the
process
already operating.



Doug Robbins - Word MVP on news.microsof said:
If I understand your first post correctly, you want to find ISBN and
inserted Carriage Return in front of it (^pISBN)

Seems to me however that is what it already has and in your post in which
you give what you say can be pasted into Excel, the record No 2 that
contained two ISBN's on separate lines assumed to be paragraphs) has
those
two ISBN's on the one line.

Maybe I just don't understand.

--
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, originally posted via msnews.microsoft.com

Pete said:
Your point is valid and clear. For the future, honest endeavour will be
made
to achieve greater skills so as to be able to do as you suggest.
Pragmatic
decision for today leads to asking that original request be met if at
all
possible. I would have thought major work was beyond the scope of the
Forum,
while request for a small piece of code was acceptable. I hope I am
not
misunderstanding this, and am certainly appreciative of any help given.

:

I would not be pasting stuff into Excel and then importing it into
Access
when it is quite feasible to develop some code to parse the original
documents and insert the required information directly into the fields
of
an
Access table.

That is why I suggested that you advise what you want to end up with,
NOT
how your are trying to go about it.

--
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, originally posted via msnews.microsoft.com

Using the same example as previously, this is what that data would
look
like
in a format that can be pasted into Excel and imported into the
Access
database. The Access Table headings equate with the first words of
the
following e.g. Type of Material. Only desired headings are actually
imported,
and the rest ignored.

Date :03/08/2009
Record Number:R1
Type of Material:BK
Date & Time Last Tr20060522140914.0
LC Control No.:2005056133
ISBN:159030313X (alk. paper)
LC Classification:N 6537 .M473 L57 2006
Dewey Class No.:769.92 22
Personal Name:Lipsey, Roger, 1942-
Main Title:Angelic mistakes :the art of Thomas Merton / Roger Lipsey
;
foreword by Paul M. Pearson.
Edition Information:1st ed.
Published/Created:(IBoston, Mass. :New Seeds ; [New York] :
Description:xvii, 197 p. :ill. ; 24 cm.
Notes:Includes bibliographical references (p. 187-190) and index.##
Subjects:Merton, Thomas, 1915-1968 -- Criticism and
interpretation.Subjects:Christian art and symbolism. Subjects:Art,
Zen --
Influence.
Related Names:Merton, Thomas, 1915-1968.
Record Number:R2
Type of Material:BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.:90021430
ISBN:0943221099 :$40.00 ISBN:0943221102 (pbk.) :$19.95
System Control No. (OCoLC)22662907 System Control No. ADY2039
LC Classification:BX4705.M542 M36 1991 Dewey Class No.:271/.12502 20
Personal Name:Meatyard, Ralph Eugene, 1925-1972.
Main Title:Father Louie :photographs of Thomas Merton / by Ralph
Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(INew York :Timken Publishers, 1991.
Description:103 p. :chiefly ill. ; 26 cm.
Subjects:Merton, Thomas, 1915-1968. Subjects:Merton, Thomas,
1915-1968 --
Pictorial works. Subjects:Merton, Thomas, 1915-1968 --
Correspondence.
Subjects:Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names:Davenport, Guy.
Sys.No.000869448



:

Thanks for showing us what you are starting with. Can you now show
us
(or
describe to us) what you want to end up with, which I assume is to
insert
some of the information into the relevant fields of a table in an
Access
database.

Please make it what you want to end up with, not how you are trying
to
go
about it.

--
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, originally posted via msnews.microsoft.com

Thanks for your consideration. I concede a higher skill set would
find
a
better route, but the original question asked is a manageable
bite
from
which
I can construct all I need to do. I provide a (shortened) couple
of
Records
towards finding a better way, but failing that I would so
appreciate
what
I
first asked. Duplicate headings cause the import to fail for that
field.
Changing the data manually has been tested and achieves the
objective
but
a
set of records of many pages & numerous different duplications
call
for
a
macro. Many thanks for your time.

Date : 03/08/2009

Record Number:R 1
Type of Material: BK
Date & Time Last Tr 20060522140914.0
LC Control No.: 2005056133
ISBN: 159030313X (alk. paper)
LC Classification: N 6537 .M473 L57 2006
Dewey Class No.: 769.92 22
Personal Name: Lipsey, Roger, 1942-
Main Title: Angelic mistakes : the art of Thomas Merton / Roger
Lipsey
;
foreword by Paul M. Pearson.
Edition Information: 1st ed.
Published/Created:(I Boston, Mass. : New Seeds ; [New York] :
Description:xvii, 197 p. : ill. ; 24 cm.
Notes: Includes bibliographical references (p. 187-190) and
index.##
Subjects: Merton, Thomas, 1915-1968 -- Criticism and
interpretation.
Subjects: Christian art and symbolism.
Subjects: Art, Zen -- Influence.
Related Names: Merton, Thomas, 1915-1968.


Record Number:R 2
Type of Material: BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.: 90021430
ISBN: 0943221099 : $40.00
ISBN: 0943221102 (pbk.) : $19.95
System Control No. (OCoLC)22662907
System Control No. ADY2039
LC Classification: BX4705.M542 M36 1991
Dewey Class No.: 271/.12502 20
Personal Name: Meatyard, Ralph Eugene, 1925-1972.
Main Title: Father Louie : photographs of Thomas Merton / by
Ralph
Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(I New York : Timken Publishers, 1991.
Description:103 p. : chiefly ill. ; 26 cm.
Subjects: Merton, Thomas, 1915-1968.
Subjects: Merton, Thomas, 1915-1968 -- Pictorial works.
Subjects: Merton, Thomas, 1915-1968 -- Correspondence.
Subjects: Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names: Davenport, Guy.
Sys.No. 000869448





:

What you are now describing is completely different to your
original
post
and I would suggest that in all probability, you are trying to
go
about
it
the wrong way.

You would need to give more precise, detailed information on
what
you
are
starting with to facilitate providing more assistance.

--
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, originally posted via
msnews.microsoft.com

The overall task needing done is complex, seeking to import
the
records
into
a database that already functions well. Essentially the
Records
have
to
be
given column headings that lend to importing the data. This I
can
do.
However, many of the records have multiple duplicate headings
which
I
can
integrate together and then import if I have the VB originally
requested.
The
simple Find and Replace would still leave me with duplicates
of
e.g.,
ISBN
whereas the VB for this item would push all the ISBN's into a
little
paragraph that I can then pick up in the database. There are
many
other
duplicate headings but I am trying to get the principle
operating
first,
then
I can apply it to the rest. I would be most grateful for this
help.

:

Unless there is something that you are not telling us, there
is
no
reason
why you cannot use Edit>Replace to replace

Record: some text ISBN [ISBN Number assumed]

with

Record: some text¶
ISBN: [ISBN Number assumed]

for all instances of ISBN in the document.

--
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, originally posted via
msnews.microsoft.com

Access community:
I need a piece of code that looks through some Word
documents
containing
records. These are of variable length and with varying
headings,
but
each
one
begins: Record:
A single example may establish the principle that I hope to
apply
to
several
other headings:
Begin at start of document; Find: Record then Find: ISBN.
Replace
this
 
P

Pete

Your understanding of what I want to do is correct.
The Code comes up with a Syntax error on the line beginning
If Left(.Paragraphs(i).Range, 4) = "ISBN" And Left(.Paragraphs(i -

Doug Robbins - Word MVP on news.microsof said:
Sorry, but that example is different to the previous before and after that
you provided in your first and second message of 3/10/2009

Is what you want to do find the first ISBN in a record and insert an empty
paragraph before it but if there is a second ISBN, do nothing with it? (I
note that in the example records contained in your first post of 3/10/2009,
there is already a colon after each ISBN)

Ignoring the colon, the following code will insert an empty paragraph before
only the first instance of ISBN in a record:

Dim i As Long, j As Long
With ActiveDocument
j = .Paragraphs.Count
For i = 2 To j
If Left(.Paragraphs(i).Range, 4) = "ISBN" And Left(.Paragraphs(i -
1).Range, 4) <> "ISBN" Then
.Paragraphs(i).Range.InsertBefore vbCr
i = i + 1
j = j + 1
End If
Next i
End With


--
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, originally posted via msnews.microsoft.com

Pete said:
Sorry if I haven't been clear: Here it is step by step.
You will notice that within each Record it will only find ISBN once
because
then it goes on to the next Record. There may be 100 records of variable
length and order of headings.

1. Begin at start of document
2. Find: Record then
3. Find: ISBN Replace this with ^pISBN: (i.e. a new blank line is
thereby inserted above ISBN and a colon:)) is added to ISBN
4. Find next Record then
5. Find: ISBN Replace this with ^pISBN:
6. Do this to the end of the document (may be several pages).

Before Code is applied After Code is applied
Record 1 Record 1
Type of Material: Bk Type of Material: Bk
ISBN 1234
ISBN 3456 ISBN: 1234
ISBN 3456

Record 2 Record 2
Dewey Decimal Call 769.92 22 Dewey Decimal Call 769.92 22

ISBN 6789
ISBN: 6789

etc

Above is supposed to be in 2 columns to illustrate change after code is
run.
Later, any duplicate headings (here it is ISBN in Record 1) are
automatically joined together with their data in one line through the
process
already operating.



Doug Robbins - Word MVP on news.microsof said:
If I understand your first post correctly, you want to find ISBN and
inserted Carriage Return in front of it (^pISBN)

Seems to me however that is what it already has and in your post in which
you give what you say can be pasted into Excel, the record No 2 that
contained two ISBN's on separate lines assumed to be paragraphs) has
those
two ISBN's on the one line.

Maybe I just don't understand.

--
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, originally posted via msnews.microsoft.com

Your point is valid and clear. For the future, honest endeavour will be
made
to achieve greater skills so as to be able to do as you suggest.
Pragmatic
decision for today leads to asking that original request be met if at
all
possible. I would have thought major work was beyond the scope of the
Forum,
while request for a small piece of code was acceptable. I hope I am
not
misunderstanding this, and am certainly appreciative of any help given.

:

I would not be pasting stuff into Excel and then importing it into
Access
when it is quite feasible to develop some code to parse the original
documents and insert the required information directly into the fields
of
an
Access table.

That is why I suggested that you advise what you want to end up with,
NOT
how your are trying to go about it.

--
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, originally posted via msnews.microsoft.com

Using the same example as previously, this is what that data would
look
like
in a format that can be pasted into Excel and imported into the
Access
database. The Access Table headings equate with the first words of
the
following e.g. Type of Material. Only desired headings are actually
imported,
and the rest ignored.

Date :03/08/2009
Record Number:R1
Type of Material:BK
Date & Time Last Tr20060522140914.0
LC Control No.:2005056133
ISBN:159030313X (alk. paper)
LC Classification:N 6537 .M473 L57 2006
Dewey Class No.:769.92 22
Personal Name:Lipsey, Roger, 1942-
Main Title:Angelic mistakes :the art of Thomas Merton / Roger Lipsey
;
foreword by Paul M. Pearson.
Edition Information:1st ed.
Published/Created:(IBoston, Mass. :New Seeds ; [New York] :
Description:xvii, 197 p. :ill. ; 24 cm.
Notes:Includes bibliographical references (p. 187-190) and index.##
Subjects:Merton, Thomas, 1915-1968 -- Criticism and
interpretation.Subjects:Christian art and symbolism. Subjects:Art,
Zen --
Influence.
Related Names:Merton, Thomas, 1915-1968.
Record Number:R2
Type of Material:BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.:90021430
ISBN:0943221099 :$40.00 ISBN:0943221102 (pbk.) :$19.95
System Control No. (OCoLC)22662907 System Control No. ADY2039
LC Classification:BX4705.M542 M36 1991 Dewey Class No.:271/.12502 20
Personal Name:Meatyard, Ralph Eugene, 1925-1972.
Main Title:Father Louie :photographs of Thomas Merton / by Ralph
Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(INew York :Timken Publishers, 1991.
Description:103 p. :chiefly ill. ; 26 cm.
Subjects:Merton, Thomas, 1915-1968. Subjects:Merton, Thomas,
1915-1968 --
Pictorial works. Subjects:Merton, Thomas, 1915-1968 --
Correspondence.
Subjects:Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names:Davenport, Guy.
Sys.No.000869448



:

Thanks for showing us what you are starting with. Can you now show
us
(or
describe to us) what you want to end up with, which I assume is to
insert
some of the information into the relevant fields of a table in an
Access
database.

Please make it what you want to end up with, not how you are trying
to
go
about it.

--
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, originally posted via msnews.microsoft.com

Thanks for your consideration. I concede a higher skill set would
find
a
better route, but the original question asked is a manageable
bite
from
which
I can construct all I need to do. I provide a (shortened) couple
of
Records
towards finding a better way, but failing that I would so
appreciate
what
I
first asked. Duplicate headings cause the import to fail for that
field.
Changing the data manually has been tested and achieves the
objective
but
a
set of records of many pages & numerous different duplications
call
for
a
macro. Many thanks for your time.

Date : 03/08/2009

Record Number:R 1
Type of Material: BK
Date & Time Last Tr 20060522140914.0
LC Control No.: 2005056133
ISBN: 159030313X (alk. paper)
LC Classification: N 6537 .M473 L57 2006
Dewey Class No.: 769.92 22
Personal Name: Lipsey, Roger, 1942-
Main Title: Angelic mistakes : the art of Thomas Merton / Roger
Lipsey
;
foreword by Paul M. Pearson.
Edition Information: 1st ed.
Published/Created:(I Boston, Mass. : New Seeds ; [New York] :
Description:xvii, 197 p. : ill. ; 24 cm.
Notes: Includes bibliographical references (p. 187-190) and
index.##
Subjects: Merton, Thomas, 1915-1968 -- Criticism and
interpretation.
Subjects: Christian art and symbolism.
Subjects: Art, Zen -- Influence.
Related Names: Merton, Thomas, 1915-1968.


Record Number:R 2
Type of Material: BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.: 90021430
ISBN: 0943221099 : $40.00
ISBN: 0943221102 (pbk.) : $19.95
System Control No. (OCoLC)22662907
System Control No. ADY2039
LC Classification: BX4705.M542 M36 1991
Dewey Class No.: 271/.12502 20
Personal Name: Meatyard, Ralph Eugene, 1925-1972.
Main Title: Father Louie : photographs of Thomas Merton / by
Ralph
Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(I New York : Timken Publishers, 1991.
Description:103 p. : chiefly ill. ; 26 cm.
Subjects: Merton, Thomas, 1915-1968.
Subjects: Merton, Thomas, 1915-1968 -- Pictorial works.
Subjects: Merton, Thomas, 1915-1968 -- Correspondence.
Subjects: Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names: Davenport, Guy.
Sys.No. 000869448





:

What you are now describing is completely different to your
original
post
and I would suggest that in all probability, you are trying to
 
D

Doug Robbins - Word MVP on news.microsoft.com

The "If" to and including the "Then" all needs to be on one line. The mail
system has probably inserted a line break which screws it up.

--
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, originally posted via msnews.microsoft.com

Pete said:
Your understanding of what I want to do is correct.
The Code comes up with a Syntax error on the line beginning
If Left(.Paragraphs(i).Range, 4) = "ISBN" And Left(.Paragraphs(i -

Doug Robbins - Word MVP on news.microsof said:
Sorry, but that example is different to the previous before and after
that
you provided in your first and second message of 3/10/2009

Is what you want to do find the first ISBN in a record and insert an
empty
paragraph before it but if there is a second ISBN, do nothing with it?
(I
note that in the example records contained in your first post of
3/10/2009,
there is already a colon after each ISBN)

Ignoring the colon, the following code will insert an empty paragraph
before
only the first instance of ISBN in a record:

Dim i As Long, j As Long
With ActiveDocument
j = .Paragraphs.Count
For i = 2 To j
If Left(.Paragraphs(i).Range, 4) = "ISBN" And
Left(.Paragraphs(i -
1).Range, 4) <> "ISBN" Then
.Paragraphs(i).Range.InsertBefore vbCr
i = i + 1
j = j + 1
End If
Next i
End With


--
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, originally posted via msnews.microsoft.com

Pete said:
Sorry if I haven't been clear: Here it is step by step.
You will notice that within each Record it will only find ISBN once
because
then it goes on to the next Record. There may be 100 records of
variable
length and order of headings.

1. Begin at start of document
2. Find: Record then
3. Find: ISBN Replace this with ^pISBN: (i.e. a new blank line
is
thereby inserted above ISBN and a colon:)) is added to ISBN
4. Find next Record then
5. Find: ISBN Replace this with ^pISBN:
6. Do this to the end of the document (may be several pages).

Before Code is applied After Code is applied
Record 1 Record 1
Type of Material: Bk Type of Material: Bk
ISBN 1234
ISBN 3456 ISBN: 1234
ISBN 3456

Record 2 Record 2
Dewey Decimal Call 769.92 22 Dewey Decimal Call 769.92 22

ISBN 6789
ISBN: 6789

etc

Above is supposed to be in 2 columns to illustrate change after code is
run.
Later, any duplicate headings (here it is ISBN in Record 1) are
automatically joined together with their data in one line through the
process
already operating.



:

If I understand your first post correctly, you want to find ISBN and
inserted Carriage Return in front of it (^pISBN)

Seems to me however that is what it already has and in your post in
which
you give what you say can be pasted into Excel, the record No 2 that
contained two ISBN's on separate lines assumed to be paragraphs) has
those
two ISBN's on the one line.

Maybe I just don't understand.

--
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, originally posted via msnews.microsoft.com

Your point is valid and clear. For the future, honest endeavour will
be
made
to achieve greater skills so as to be able to do as you suggest.
Pragmatic
decision for today leads to asking that original request be met if
at
all
possible. I would have thought major work was beyond the scope of
the
Forum,
while request for a small piece of code was acceptable. I hope I am
not
misunderstanding this, and am certainly appreciative of any help
given.

:

I would not be pasting stuff into Excel and then importing it into
Access
when it is quite feasible to develop some code to parse the
original
documents and insert the required information directly into the
fields
of
an
Access table.

That is why I suggested that you advise what you want to end up
with,
NOT
how your are trying to go about it.

--
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, originally posted via msnews.microsoft.com

Using the same example as previously, this is what that data
would
look
like
in a format that can be pasted into Excel and imported into the
Access
database. The Access Table headings equate with the first words
of
the
following e.g. Type of Material. Only desired headings are
actually
imported,
and the rest ignored.

Date :03/08/2009
Record Number:R1
Type of Material:BK
Date & Time Last Tr20060522140914.0
LC Control No.:2005056133
ISBN:159030313X (alk. paper)
LC Classification:N 6537 .M473 L57 2006
Dewey Class No.:769.92 22
Personal Name:Lipsey, Roger, 1942-
Main Title:Angelic mistakes :the art of Thomas Merton / Roger
Lipsey
;
foreword by Paul M. Pearson.
Edition Information:1st ed.
Published/Created:(IBoston, Mass. :New Seeds ; [New York] :
Description:xvii, 197 p. :ill. ; 24 cm.
Notes:Includes bibliographical references (p. 187-190) and
index.##
Subjects:Merton, Thomas, 1915-1968 -- Criticism and
interpretation.Subjects:Christian art and symbolism.
Subjects:Art,
Zen --
Influence.
Related Names:Merton, Thomas, 1915-1968.
Record Number:R2
Type of Material:BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.:90021430
ISBN:0943221099 :$40.00 ISBN:0943221102 (pbk.) :$19.95
System Control No. (OCoLC)22662907 System Control No. ADY2039
LC Classification:BX4705.M542 M36 1991 Dewey Class No.:271/.12502
20
Personal Name:Meatyard, Ralph Eugene, 1925-1972.
Main Title:Father Louie :photographs of Thomas Merton / by Ralph
Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(INew York :Timken Publishers, 1991.
Description:103 p. :chiefly ill. ; 26 cm.
Subjects:Merton, Thomas, 1915-1968. Subjects:Merton, Thomas,
1915-1968 --
Pictorial works. Subjects:Merton, Thomas, 1915-1968 --
Correspondence.
Subjects:Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names:Davenport, Guy.
Sys.No.000869448



:

Thanks for showing us what you are starting with. Can you now
show
us
(or
describe to us) what you want to end up with, which I assume is
to
insert
some of the information into the relevant fields of a table in
an
Access
database.

Please make it what you want to end up with, not how you are
trying
to
go
about it.

--
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, originally posted via
msnews.microsoft.com

Thanks for your consideration. I concede a higher skill set
would
find
a
better route, but the original question asked is a manageable
bite
from
which
I can construct all I need to do. I provide a (shortened)
couple
of
Records
towards finding a better way, but failing that I would so
appreciate
what
I
first asked. Duplicate headings cause the import to fail for
that
field.
Changing the data manually has been tested and achieves the
objective
but
a
set of records of many pages & numerous different duplications
call
for
a
macro. Many thanks for your time.

Date : 03/08/2009

Record Number:R 1
Type of Material: BK
Date & Time Last Tr 20060522140914.0
LC Control No.: 2005056133
ISBN: 159030313X (alk. paper)
LC Classification: N 6537 .M473 L57 2006
Dewey Class No.: 769.92 22
Personal Name: Lipsey, Roger, 1942-
Main Title: Angelic mistakes : the art of Thomas Merton /
Roger
Lipsey
;
foreword by Paul M. Pearson.
Edition Information: 1st ed.
Published/Created:(I Boston, Mass. : New Seeds ; [New York] :
Description:xvii, 197 p. : ill. ; 24 cm.
Notes: Includes bibliographical references (p. 187-190) and
index.##
Subjects: Merton, Thomas, 1915-1968 -- Criticism and
interpretation.
Subjects: Christian art and symbolism.
Subjects: Art, Zen -- Influence.
Related Names: Merton, Thomas, 1915-1968.


Record Number:R 2
Type of Material: BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.: 90021430
ISBN: 0943221099 : $40.00
ISBN: 0943221102 (pbk.) : $19.95
System Control No. (OCoLC)22662907
System Control No. ADY2039
LC Classification: BX4705.M542 M36 1991
Dewey Class No.: 271/.12502 20
Personal Name: Meatyard, Ralph Eugene, 1925-1972.
Main Title: Father Louie : photographs of Thomas Merton / by
Ralph
Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(I New York : Timken Publishers, 1991.
Description:103 p. : chiefly ill. ; 26 cm.
Subjects: Merton, Thomas, 1915-1968.
Subjects: Merton, Thomas, 1915-1968 -- Pictorial works.
Subjects: Merton, Thomas, 1915-1968 -- Correspondence.
Subjects: Meatyard, Ralph Eugene, 1925-1972. --
Correspondence.
Related Names: Davenport, Guy.
Sys.No. 000869448





:

What you are now describing is completely different to your
original
post
and I would suggest that in all probability, you are trying
to
 
P

Pete

Sincere thanks. Works a treat. Merci beaucoup.


Doug Robbins - Word MVP on news.microsof said:
The "If" to and including the "Then" all needs to be on one line. The mail
system has probably inserted a line break which screws it up.

--
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, originally posted via msnews.microsoft.com

Pete said:
Your understanding of what I want to do is correct.
The Code comes up with a Syntax error on the line beginning
If Left(.Paragraphs(i).Range, 4) = "ISBN" And Left(.Paragraphs(i -

Doug Robbins - Word MVP on news.microsof said:
Sorry, but that example is different to the previous before and after
that
you provided in your first and second message of 3/10/2009

Is what you want to do find the first ISBN in a record and insert an
empty
paragraph before it but if there is a second ISBN, do nothing with it?
(I
note that in the example records contained in your first post of
3/10/2009,
there is already a colon after each ISBN)

Ignoring the colon, the following code will insert an empty paragraph
before
only the first instance of ISBN in a record:

Dim i As Long, j As Long
With ActiveDocument
j = .Paragraphs.Count
For i = 2 To j
If Left(.Paragraphs(i).Range, 4) = "ISBN" And
Left(.Paragraphs(i -
1).Range, 4) <> "ISBN" Then
.Paragraphs(i).Range.InsertBefore vbCr
i = i + 1
j = j + 1
End If
Next i
End With


--
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, originally posted via msnews.microsoft.com

Sorry if I haven't been clear: Here it is step by step.
You will notice that within each Record it will only find ISBN once
because
then it goes on to the next Record. There may be 100 records of
variable
length and order of headings.

1. Begin at start of document
2. Find: Record then
3. Find: ISBN Replace this with ^pISBN: (i.e. a new blank line
is
thereby inserted above ISBN and a colon:)) is added to ISBN
4. Find next Record then
5. Find: ISBN Replace this with ^pISBN:
6. Do this to the end of the document (may be several pages).

Before Code is applied After Code is applied
Record 1 Record 1
Type of Material: Bk Type of Material: Bk
ISBN 1234
ISBN 3456 ISBN: 1234
ISBN 3456

Record 2 Record 2
Dewey Decimal Call 769.92 22 Dewey Decimal Call 769.92 22

ISBN 6789
ISBN: 6789

etc

Above is supposed to be in 2 columns to illustrate change after code is
run.
Later, any duplicate headings (here it is ISBN in Record 1) are
automatically joined together with their data in one line through the
process
already operating.



:

If I understand your first post correctly, you want to find ISBN and
inserted Carriage Return in front of it (^pISBN)

Seems to me however that is what it already has and in your post in
which
you give what you say can be pasted into Excel, the record No 2 that
contained two ISBN's on separate lines assumed to be paragraphs) has
those
two ISBN's on the one line.

Maybe I just don't understand.

--
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, originally posted via msnews.microsoft.com

Your point is valid and clear. For the future, honest endeavour will
be
made
to achieve greater skills so as to be able to do as you suggest.
Pragmatic
decision for today leads to asking that original request be met if
at
all
possible. I would have thought major work was beyond the scope of
the
Forum,
while request for a small piece of code was acceptable. I hope I am
not
misunderstanding this, and am certainly appreciative of any help
given.

:

I would not be pasting stuff into Excel and then importing it into
Access
when it is quite feasible to develop some code to parse the
original
documents and insert the required information directly into the
fields
of
an
Access table.

That is why I suggested that you advise what you want to end up
with,
NOT
how your are trying to go about it.

--
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, originally posted via msnews.microsoft.com

Using the same example as previously, this is what that data
would
look
like
in a format that can be pasted into Excel and imported into the
Access
database. The Access Table headings equate with the first words
of
the
following e.g. Type of Material. Only desired headings are
actually
imported,
and the rest ignored.

Date :03/08/2009
Record Number:R1
Type of Material:BK
Date & Time Last Tr20060522140914.0
LC Control No.:2005056133
ISBN:159030313X (alk. paper)
LC Classification:N 6537 .M473 L57 2006
Dewey Class No.:769.92 22
Personal Name:Lipsey, Roger, 1942-
Main Title:Angelic mistakes :the art of Thomas Merton / Roger
Lipsey
;
foreword by Paul M. Pearson.
Edition Information:1st ed.
Published/Created:(IBoston, Mass. :New Seeds ; [New York] :
Description:xvii, 197 p. :ill. ; 24 cm.
Notes:Includes bibliographical references (p. 187-190) and
index.##
Subjects:Merton, Thomas, 1915-1968 -- Criticism and
interpretation.Subjects:Christian art and symbolism.
Subjects:Art,
Zen --
Influence.
Related Names:Merton, Thomas, 1915-1968.
Record Number:R2
Type of Material:BK
Fixed-Length Field 901022s1991 nyu 000 0 eng
LC Control No.:90021430
ISBN:0943221099 :$40.00 ISBN:0943221102 (pbk.) :$19.95
System Control No. (OCoLC)22662907 System Control No. ADY2039
LC Classification:BX4705.M542 M36 1991 Dewey Class No.:271/.12502
20
Personal Name:Meatyard, Ralph Eugene, 1925-1972.
Main Title:Father Louie :photographs of Thomas Merton / by Ralph
Eugene
Meatyard ; with an essay by Guy Davenport.
Published/Created:(INew York :Timken Publishers, 1991.
Description:103 p. :chiefly ill. ; 26 cm.
Subjects:Merton, Thomas, 1915-1968. Subjects:Merton, Thomas,
1915-1968 --
Pictorial works. Subjects:Merton, Thomas, 1915-1968 --
Correspondence.
Subjects:Meatyard, Ralph Eugene, 1925-1972. -- Correspondence.
Related Names:Davenport, Guy.
Sys.No.000869448



:

Thanks for showing us what you are starting with. Can you now
show
us
(or
describe to us) what you want to end up with, which I assume is
to
insert
some of the information into the relevant fields of a table in
an
Access
database.

Please make it what you want to end up with, not how you are
trying
to
go
about it.

--
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, originally posted via
msnews.microsoft.com

Thanks for your consideration. I concede a higher skill set
would
find
a
better route, but the original question asked is a manageable
bite
from
which
I can construct all I need to do. I provide a (shortened)
couple
of
Records
towards finding a better way, but failing that I would so
appreciate
what
I
first asked. Duplicate headings cause the import to fail for
that
field.
Changing the data manually has been tested and achieves the
objective
but
a
set of records of many pages & numerous different duplications
call
for
a
macro. Many thanks for your time.

Date : 03/08/2009

Record Number:R 1
Type of Material: BK
Date & Time Last Tr 20060522140914.0
LC Control No.: 2005056133
ISBN: 159030313X (alk. paper)
LC Classification: N 6537 .M473 L57 2006
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top