Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Vic[_2_] Vic[_2_] is offline
external usenet poster
 
Posts: 18
Default Merging PDF Documents

I have a VB6 application that does a mail merge using an Access database
which works fine for database fields. I now have a requirement that it also
do a merge of PDF documents. These documents will be Crystal reports that
will be turned into PDF files. I will need to insert multiple {tags} that
will identify which PDF file to insert. Can someone tell me how to go about
doing this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas? I'm
using Word 2007.


Thanks ,


Vic

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Merging PDF Documents

I believe that the only way to do that will be after executing the merge to
a new document and then run a macro using code that searches for each tag
and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the mail
merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access database
which works fine for database fields. I now have a requirement that it
also do a merge of PDF documents. These documents will be Crystal reports
that will be turned into PDF files. I will need to insert multiple {tags}
that will identify which PDF file to insert. Can someone tell me how to go
about doing this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas? I'm
using Word 2007.


Thanks ,


Vic


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Vic[_2_] Vic[_2_] is offline
external usenet poster
 
Posts: 18
Default Merging PDF Documents

Thanks Doug ! I'll see what I can pit together!

Vic

"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the merge to
a new document and then run a macro using code that searches for each tag
and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the mail
merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access database
which works fine for database fields. I now have a requirement that it
also do a merge of PDF documents. These documents will be Crystal reports
that will be turned into PDF files. I will need to insert multiple {tags}
that will identify which PDF file to insert. Can someone tell me how to
go about doing this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject ClassType:="AcroExch.Document.7",
_
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas? I'm
using Word 2007.


Thanks ,


Vic



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Vic[_2_] Vic[_2_] is offline
external usenet poster
 
Posts: 18
Default Merging PDF Documents

Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd forgotten about
because I knew this before I started this little project. When an object is
inserted into word, it is limited to a single page. Do you know a way
around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the merge to
a new document and then run a macro using code that searches for each tag
and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the mail
merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access database
which works fine for database fields. I now have a requirement that it
also do a merge of PDF documents. These documents will be Crystal reports
that will be turned into PDF files. I will need to insert multiple {tags}
that will identify which PDF file to insert. Can someone tell me how to
go about doing this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject ClassType:="AcroExch.Document.7",
_
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas? I'm
using Word 2007.


Thanks ,


Vic



  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Merging PDF Documents

There is no way around this limitation. Can the Crystal Reports be
converted into some text format so that they would not need to be included
as an object, but rather as "ordinary" text that will flow from one page to
the next. That would probably overcome all of your problems.

If I needed to do something like this, I would be investigating making
direct use from Word of the data that is being use to create the Crystal
Reports and not make use of them at all.

--
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
"Vic" wrote in message
...
Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd forgotten
about because I knew this before I started this little project. When an
object is inserted into word, it is limited to a single page. Do you know
a way around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the merge
to a new document and then run a macro using code that searches for each
tag and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the mail
merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access database
which works fine for database fields. I now have a requirement that it
also do a merge of PDF documents. These documents will be Crystal reports
that will be turned into PDF files. I will need to insert multiple
{tags} that will identify which PDF file to insert. Can someone tell me
how to go about doing this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject ClassType:="AcroExch.Document.7",
_
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas? I'm
using Word 2007.


Thanks ,


Vic






  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Vic[_2_] Vic[_2_] is offline
external usenet poster
 
Posts: 18
Default Merging PDF Documents

Doug,

The reports that I'm having to combine with the Word Document are not text
because they have lines, shading colors etc. The reports are generated from
an Access Database using Crystal Reports. Crystal can export to various
formats including Word and I would have thought there would be a way to
import/combine several word documents into 1 but I'm not finding this to be
the case. The Insert facility allows for objects but limited to a single
page (even Word documents).

Right now I'm just trying to come up with a method manually using Word but
not having much luck. I've tried to select an entire 2nd document and
paste into the primary document but the paste ends up walking over the first
page of the document instead of starting at the location of the cursor it
starts at the beginning of the document. There must be a way, do you have
any ideas?

Thanks,

Vic



"Doug Robbins - Word MVP" wrote in message
...
There is no way around this limitation. Can the Crystal Reports be
converted into some text format so that they would not need to be included
as an object, but rather as "ordinary" text that will flow from one page
to the next. That would probably overcome all of your problems.

If I needed to do something like this, I would be investigating making
direct use from Word of the data that is being use to create the Crystal
Reports and not make use of them at all.

--
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
"Vic" wrote in message
...
Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd forgotten
about because I knew this before I started this little project. When an
object is inserted into word, it is limited to a single page. Do you
know a way around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the merge
to a new document and then run a macro using code that searches for each
tag and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the mail
merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access database
which works fine for database fields. I now have a requirement that it
also do a merge of PDF documents. These documents will be Crystal
reports that will be turned into PDF files. I will need to insert
multiple {tags} that will identify which PDF file to insert. Can
someone tell me how to go about doing this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas? I'm
using Word 2007.


Thanks ,


Vic





  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Vic[_2_] Vic[_2_] is offline
external usenet poster
 
Posts: 18
Default Merging PDF Documents

Doug,

The reports that I'm trying to insert into Word are not plain text because
they have shading, lines, colors etc. The reports are generated froman
Access Database using Crystal Reports. Crystal can export to various formats
including Word and I would have thought there would be a way to combine
several different word documents into a single document.

I'm trying to manually come up with a method to do this but not having much
luck. If a try to select an entire 2nd document and then use copy/paste to
insert it into the primary document it always starts the paste at the top of
the document instead of where the cursor was positioned.

Do you have any more ideas on how this might be possible?

Vic


"Doug Robbins - Word MVP" wrote in message
...
There is no way around this limitation. Can the Crystal Reports be
converted into some text format so that they would not need to be included
as an object, but rather as "ordinary" text that will flow from one page
to the next. That would probably overcome all of your problems.

If I needed to do something like this, I would be investigating making
direct use from Word of the data that is being use to create the Crystal
Reports and not make use of them at all.

--
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
"Vic" wrote in message
...
Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd forgotten
about because I knew this before I started this little project. When an
object is inserted into word, it is limited to a single page. Do you
know a way around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the merge
to a new document and then run a macro using code that searches for each
tag and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the mail
merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access database
which works fine for database fields. I now have a requirement that it
also do a merge of PDF documents. These documents will be Crystal
reports that will be turned into PDF files. I will need to insert
multiple {tags} that will identify which PDF file to insert. Can
someone tell me how to go about doing this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas? I'm
using Word 2007.


Thanks ,


Vic





  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Merging PDF Documents

If Crystal can export in Word Format, try making using of that ability.

--
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
"Vic" wrote in message
...
Doug,

The reports that I'm having to combine with the Word Document are not text
because they have lines, shading colors etc. The reports are generated
from an Access Database using Crystal Reports. Crystal can export to
various formats including Word and I would have thought there would be a
way to import/combine several word documents into 1 but I'm not finding
this to be the case. The Insert facility allows for objects but limited to
a single page (even Word documents).

Right now I'm just trying to come up with a method manually using Word but
not having much luck. I've tried to select an entire 2nd document and
paste into the primary document but the paste ends up walking over the
first page of the document instead of starting at the location of the
cursor it starts at the beginning of the document. There must be a way,
do you have any ideas?

Thanks,

Vic



"Doug Robbins - Word MVP" wrote in message
...
There is no way around this limitation. Can the Crystal Reports be
converted into some text format so that they would not need to be
included as an object, but rather as "ordinary" text that will flow from
one page to the next. That would probably overcome all of your problems.

If I needed to do something like this, I would be investigating making
direct use from Word of the data that is being use to create the Crystal
Reports and not make use of them at all.

--
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
"Vic" wrote in message
...
Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd forgotten
about because I knew this before I started this little project. When an
object is inserted into word, it is limited to a single page. Do you
know a way around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the merge
to a new document and then run a macro using code that searches for each
tag and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) =
True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the mail
merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access
database which works fine for database fields. I now have a
requirement that it also do a merge of PDF documents. These documents
will be Crystal reports that will be turned into PDF files. I will
need to insert multiple {tags} that will identify which PDF file to
insert. Can someone tell me how to go about doing this, maybe some
sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas?
I'm using Word 2007.


Thanks ,


Vic






  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Vic[_2_] Vic[_2_] is offline
external usenet poster
 
Posts: 18
Default Merging PDF Documents

Doug,

Yes, it does export to word RTF files which is what I've been trying to get
these to work. I insert as an object then it's the same as a PDF where you
only get the first page. If I insert as a file, it imports starting at the
top of the document instead of where the cursor is positioned. I'm not
doing this with a macro, I'm using the functions on the ribbon so this isn't
a coding problem. It ends up walking all over the text at both the ends of
the document,


Vic




"Doug Robbins - Word MVP" wrote in message
...
If Crystal can export in Word Format, try making using of that ability.

--
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
"Vic" wrote in message
...
Doug,

The reports that I'm having to combine with the Word Document are not
text because they have lines, shading colors etc. The reports are
generated from an Access Database using Crystal Reports. Crystal can
export to various formats including Word and I would have thought there
would be a way to import/combine several word documents into 1 but I'm
not finding this to be the case. The Insert facility allows for objects
but limited to a single page (even Word documents).

Right now I'm just trying to come up with a method manually using Word
but not having much luck. I've tried to select an entire 2nd document
and paste into the primary document but the paste ends up walking over
the first page of the document instead of starting at the location of the
cursor it starts at the beginning of the document. There must be a way,
do you have any ideas?

Thanks,

Vic



"Doug Robbins - Word MVP" wrote in message
...
There is no way around this limitation. Can the Crystal Reports be
converted into some text format so that they would not need to be
included as an object, but rather as "ordinary" text that will flow from
one page to the next. That would probably overcome all of your
problems.

If I needed to do something like this, I would be investigating making
direct use from Word of the data that is being use to create the Crystal
Reports and not make use of them at all.

--
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
"Vic" wrote in message
...
Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd forgotten
about because I knew this before I started this little project. When an
object is inserted into word, it is limited to a single page. Do you
know a way around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the
merge to a new document and then run a macro using code that searches
for each tag and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) =
True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the
mail merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access
database which works fine for database fields. I now have a
requirement that it also do a merge of PDF documents. These documents
will be Crystal reports that will be turned into PDF files. I will
need to insert multiple {tags} that will identify which PDF file to
insert. Can someone tell me how to go about doing this, maybe some
sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas?
I'm using Word 2007.


Thanks ,


Vic







  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Merging PDF Documents

Use and INCLUDETEXT field.

--
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
"Vic" wrote in message
...
Doug,

Yes, it does export to word RTF files which is what I've been trying to
get these to work. I insert as an object then it's the same as a PDF where
you only get the first page. If I insert as a file, it imports starting at
the top of the document instead of where the cursor is positioned. I'm
not doing this with a macro, I'm using the functions on the ribbon so this
isn't a coding problem. It ends up walking all over the text at both the
ends of the document,


Vic




"Doug Robbins - Word MVP" wrote in message
...
If Crystal can export in Word Format, try making using of that ability.

--
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
"Vic" wrote in message
...
Doug,

The reports that I'm having to combine with the Word Document are not
text because they have lines, shading colors etc. The reports are
generated from an Access Database using Crystal Reports. Crystal can
export to various formats including Word and I would have thought there
would be a way to import/combine several word documents into 1 but I'm
not finding this to be the case. The Insert facility allows for objects
but limited to a single page (even Word documents).

Right now I'm just trying to come up with a method manually using Word
but not having much luck. I've tried to select an entire 2nd document
and paste into the primary document but the paste ends up walking over
the first page of the document instead of starting at the location of
the cursor it starts at the beginning of the document. There must be a
way, do you have any ideas?

Thanks,

Vic



"Doug Robbins - Word MVP" wrote in message
...
There is no way around this limitation. Can the Crystal Reports be
converted into some text format so that they would not need to be
included as an object, but rather as "ordinary" text that will flow
from one page to the next. That would probably overcome all of your
problems.

If I needed to do something like this, I would be investigating making
direct use from Word of the data that is being use to create the
Crystal Reports and not make use of them at all.

--
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
"Vic" wrote in message
...
Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd forgotten
about because I knew this before I started this little project. When
an object is inserted into word, it is limited to a single page. Do
you know a way around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the
merge to a new document and then run a macro using code that searches
for each tag and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) =
True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the
mail merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access
database which works fine for database fields. I now have a
requirement that it also do a merge of PDF documents. These documents
will be Crystal reports that will be turned into PDF files. I will
need to insert multiple {tags} that will identify which PDF file to
insert. Can someone tell me how to go about doing this, maybe some
sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas?
I'm using Word 2007.


Thanks ,


Vic










  #11   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Vic[_2_] Vic[_2_] is offline
external usenet poster
 
Posts: 18
Default Merging PDF Documents

Doug,

OK - I tried { INCLUDETEXT "C:\\Temp\\EPA_Regs.rtf" \* MERGEFORMAT } and it
does the same thing! It includes it at the top of the document and writes
right on top of the text already in the document!

Any ideas?

Vic



"Doug Robbins - Word MVP" wrote in message
...
Use and INCLUDETEXT field.

--
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
"Vic" wrote in message
...
Doug,

Yes, it does export to word RTF files which is what I've been trying to
get these to work. I insert as an object then it's the same as a PDF
where you only get the first page. If I insert as a file, it imports
starting at the top of the document instead of where the cursor is
positioned. I'm not doing this with a macro, I'm using the functions on
the ribbon so this isn't a coding problem. It ends up walking all over
the text at both the ends of the document,


Vic




"Doug Robbins - Word MVP" wrote in message
...
If Crystal can export in Word Format, try making using of that ability.

--
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
"Vic" wrote in message
...
Doug,

The reports that I'm having to combine with the Word Document are not
text because they have lines, shading colors etc. The reports are
generated from an Access Database using Crystal Reports. Crystal can
export to various formats including Word and I would have thought
there would be a way to import/combine several word documents into 1
but I'm not finding this to be the case. The Insert facility allows for
objects but limited to a single page (even Word documents).

Right now I'm just trying to come up with a method manually using Word
but not having much luck. I've tried to select an entire 2nd document
and paste into the primary document but the paste ends up walking over
the first page of the document instead of starting at the location of
the cursor it starts at the beginning of the document. There must be a
way, do you have any ideas?

Thanks,

Vic



"Doug Robbins - Word MVP" wrote in message
...
There is no way around this limitation. Can the Crystal Reports be
converted into some text format so that they would not need to be
included as an object, but rather as "ordinary" text that will flow
from one page to the next. That would probably overcome all of your
problems.

If I needed to do something like this, I would be investigating making
direct use from Word of the data that is being use to create the
Crystal Reports and not make use of them at all.

--
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
"Vic" wrote in message
...
Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd
forgotten about because I knew this before I started this little
project. When an object is inserted into word, it is limited to a
single page. Do you know a way around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the
merge to a new document and then run a macro using code that searches
for each tag and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) =
True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the
mail merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access
database which works fine for database fields. I now have a
requirement that it also do a merge of PDF documents. These
documents will be Crystal reports that will be turned into PDF
files. I will need to insert multiple {tags} that will identify
which PDF file to insert. Can someone tell me how to go about doing
this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas?
I'm using Word 2007.


Thanks ,


Vic









  #12   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Vic[_2_] Vic[_2_] is offline
external usenet poster
 
Posts: 18
Default Merging PDF Documents

Hmm - well it looks like the problem is the way Crystal is is creating these
word files. This problem does not happen with oter word docs.

Vic


"Doug Robbins - Word MVP" wrote in message
...
Use and INCLUDETEXT field.

--
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
"Vic" wrote in message
...
Doug,

Yes, it does export to word RTF files which is what I've been trying to
get these to work. I insert as an object then it's the same as a PDF
where you only get the first page. If I insert as a file, it imports
starting at the top of the document instead of where the cursor is
positioned. I'm not doing this with a macro, I'm using the functions on
the ribbon so this isn't a coding problem. It ends up walking all over
the text at both the ends of the document,


Vic




"Doug Robbins - Word MVP" wrote in message
...
If Crystal can export in Word Format, try making using of that ability.

--
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
"Vic" wrote in message
...
Doug,

The reports that I'm having to combine with the Word Document are not
text because they have lines, shading colors etc. The reports are
generated from an Access Database using Crystal Reports. Crystal can
export to various formats including Word and I would have thought
there would be a way to import/combine several word documents into 1
but I'm not finding this to be the case. The Insert facility allows for
objects but limited to a single page (even Word documents).

Right now I'm just trying to come up with a method manually using Word
but not having much luck. I've tried to select an entire 2nd document
and paste into the primary document but the paste ends up walking over
the first page of the document instead of starting at the location of
the cursor it starts at the beginning of the document. There must be a
way, do you have any ideas?

Thanks,

Vic



"Doug Robbins - Word MVP" wrote in message
...
There is no way around this limitation. Can the Crystal Reports be
converted into some text format so that they would not need to be
included as an object, but rather as "ordinary" text that will flow
from one page to the next. That would probably overcome all of your
problems.

If I needed to do something like this, I would be investigating making
direct use from Word of the data that is being use to create the
Crystal Reports and not make use of them at all.

--
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
"Vic" wrote in message
...
Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd
forgotten about because I knew this before I started this little
project. When an object is inserted into word, it is limited to a
single page. Do you know a way around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the
merge to a new document and then run a macro using code that searches
for each tag and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) =
True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the
mail merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access
database which works fine for database fields. I now have a
requirement that it also do a merge of PDF documents. These
documents will be Crystal reports that will be turned into PDF
files. I will need to insert multiple {tags} that will identify
which PDF file to insert. Can someone tell me how to go about doing
this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas?
I'm using Word 2007.


Thanks ,


Vic









  #13   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Merging PDF Documents

Sorry, I have no experience with Crystal Reports so cannot help you.

It seems strange however as a document that is included in another document
by means of an { INCLUDETEXT } field is normally inserted at the location of
that field. If you toggle the display of field codes, the { INCLUDETEXT }
field would appear in place of the text of the document.

--
Hope this helps

Doug Robbins - Word MVP
Please reply only to the newsgroups unless you wish to avail yourself of my
services on a paid, professional basis.

"Vic" wrote in message
...
Hmm - well it looks like the problem is the way Crystal is is creating
these word files. This problem does not happen with oter word docs.

Vic


"Doug Robbins - Word MVP" wrote in message
...
Use and INCLUDETEXT field.

--
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
"Vic" wrote in message
...
Doug,

Yes, it does export to word RTF files which is what I've been trying to
get these to work. I insert as an object then it's the same as a PDF
where you only get the first page. If I insert as a file, it imports
starting at the top of the document instead of where the cursor is
positioned. I'm not doing this with a macro, I'm using the functions on
the ribbon so this isn't a coding problem. It ends up walking all over
the text at both the ends of the document,


Vic




"Doug Robbins - Word MVP" wrote in message
...
If Crystal can export in Word Format, try making using of that ability.

--
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
"Vic" wrote in message
...
Doug,

The reports that I'm having to combine with the Word Document are not
text because they have lines, shading colors etc. The reports are
generated from an Access Database using Crystal Reports. Crystal can
export to various formats including Word and I would have thought
there would be a way to import/combine several word documents into 1
but I'm not finding this to be the case. The Insert facility allows
for objects but limited to a single page (even Word documents).

Right now I'm just trying to come up with a method manually using Word
but not having much luck. I've tried to select an entire 2nd document
and paste into the primary document but the paste ends up walking over
the first page of the document instead of starting at the location of
the cursor it starts at the beginning of the document. There must be
a way, do you have any ideas?

Thanks,

Vic



"Doug Robbins - Word MVP" wrote in message
...
There is no way around this limitation. Can the Crystal Reports be
converted into some text format so that they would not need to be
included as an object, but rather as "ordinary" text that will flow
from one page to the next. That would probably overcome all of your
problems.

If I needed to do something like this, I would be investigating
making direct use from Word of the data that is being use to create
the Crystal Reports and not make use of them at all.

--
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
"Vic" wrote in message
...
Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd
forgotten about because I knew this before I started this little
project. When an object is inserted into word, it is limited to a
single page. Do you know a way around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the
merge to a new document and then run a macro using code that
searches for each tag and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) =
True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the
mail merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access
database which works fine for database fields. I now have a
requirement that it also do a merge of PDF documents. These
documents will be Crystal reports that will be turned into PDF
files. I will need to insert multiple {tags} that will identify
which PDF file to insert. Can someone tell me how to go about
doing this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any ideas?
I'm using Word 2007.


Thanks ,


Vic











  #14   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Vic[_2_] Vic[_2_] is offline
external usenet poster
 
Posts: 18
Default Merging PDF Documents

Doug,

It's really hard to tell for sure if this is a Crystal problem or a Word
problem. I used a program for converting RTF to DOC and then tried
inserting the newly created DOC file and it does the sam thing (walks all
over the text at the start of the document.

There's obviously something in this DOC file that is causing it to go crazy.
If you'd like to see the RTF/DOC file, let me know and I'd be happy for you
to look at it. Maybe you'll see something there causing the problem.

Vic

"Doug Robbins - Word MVP" wrote in message
...
Sorry, I have no experience with Crystal Reports so cannot help you.

It seems strange however as a document that is included in another
document by means of an { INCLUDETEXT } field is normally inserted at the
location of that field. If you toggle the display of field codes, the
{ INCLUDETEXT } field would appear in place of the text of the document.

--
Hope this helps

Doug Robbins - Word MVP
Please reply only to the newsgroups unless you wish to avail yourself of
my services on a paid, professional basis.

"Vic" wrote in message
...
Hmm - well it looks like the problem is the way Crystal is is creating
these word files. This problem does not happen with oter word docs.

Vic


"Doug Robbins - Word MVP" wrote in message
...
Use and INCLUDETEXT field.

--
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
"Vic" wrote in message
...
Doug,

Yes, it does export to word RTF files which is what I've been trying to
get these to work. I insert as an object then it's the same as a PDF
where you only get the first page. If I insert as a file, it imports
starting at the top of the document instead of where the cursor is
positioned. I'm not doing this with a macro, I'm using the functions
on the ribbon so this isn't a coding problem. It ends up walking all
over the text at both the ends of the document,


Vic




"Doug Robbins - Word MVP" wrote in message
...
If Crystal can export in Word Format, try making using of that
ability.

--
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
"Vic" wrote in message
...
Doug,

The reports that I'm having to combine with the Word Document are not
text because they have lines, shading colors etc. The reports are
generated from an Access Database using Crystal Reports. Crystal can
export to various formats including Word and I would have thought
there would be a way to import/combine several word documents into 1
but I'm not finding this to be the case. The Insert facility allows
for objects but limited to a single page (even Word documents).

Right now I'm just trying to come up with a method manually using
Word but not having much luck. I've tried to select an entire 2nd
document and paste into the primary document but the paste ends up
walking over the first page of the document instead of starting at
the location of the cursor it starts at the beginning of the
document. There must be a way, do you have any ideas?

Thanks,

Vic



"Doug Robbins - Word MVP" wrote in message
...
There is no way around this limitation. Can the Crystal Reports be
converted into some text format so that they would not need to be
included as an object, but rather as "ordinary" text that will flow
from one page to the next. That would probably overcome all of your
problems.

If I needed to do something like this, I would be investigating
making direct use from Word of the data that is being use to create
the Crystal Reports and not make use of them at all.

--
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
"Vic" wrote in message
...
Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd
forgotten about because I knew this before I started this little
project. When an object is inserted into word, it is limited to a
single page. Do you know a way around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in message
...
I believe that the only way to do that will be after executing the
merge to a new document and then run a macro using code that
searches for each tag and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False)
= True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into the
mail merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access
database which works fine for database fields. I now have a
requirement that it also do a merge of PDF documents. These
documents will be Crystal reports that will be turned into PDF
files. I will need to insert multiple {tags} that will identify
which PDF file to insert. Can someone tell me how to go about
doing this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any
ideas? I'm using Word 2007.


Thanks ,


Vic












  #15   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Merging PDF Documents

Hi Vic,

Send a copy to me at and I will take a look at 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
"Vic" wrote in message
...
Doug,

It's really hard to tell for sure if this is a Crystal problem or a Word
problem. I used a program for converting RTF to DOC and then tried
inserting the newly created DOC file and it does the sam thing (walks all
over the text at the start of the document.

There's obviously something in this DOC file that is causing it to go
crazy. If you'd like to see the RTF/DOC file, let me know and I'd be happy
for you to look at it. Maybe you'll see something there causing the
problem.

Vic

"Doug Robbins - Word MVP" wrote in message
...
Sorry, I have no experience with Crystal Reports so cannot help you.

It seems strange however as a document that is included in another
document by means of an { INCLUDETEXT } field is normally inserted at the
location of that field. If you toggle the display of field codes, the
{ INCLUDETEXT } field would appear in place of the text of the document.

--
Hope this helps

Doug Robbins - Word MVP
Please reply only to the newsgroups unless you wish to avail yourself of
my services on a paid, professional basis.

"Vic" wrote in message
...
Hmm - well it looks like the problem is the way Crystal is is creating
these word files. This problem does not happen with oter word docs.

Vic


"Doug Robbins - Word MVP" wrote in message
...
Use and INCLUDETEXT field.

--
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
"Vic" wrote in message
...
Doug,

Yes, it does export to word RTF files which is what I've been trying
to get these to work. I insert as an object then it's the same as a
PDF where you only get the first page. If I insert as a file, it
imports starting at the top of the document instead of where the
cursor is positioned. I'm not doing this with a macro, I'm using the
functions on the ribbon so this isn't a coding problem. It ends up
walking all over the text at both the ends of the document,


Vic




"Doug Robbins - Word MVP" wrote in message
...
If Crystal can export in Word Format, try making using of that
ability.

--
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
"Vic" wrote in message
...
Doug,

The reports that I'm having to combine with the Word Document are
not text because they have lines, shading colors etc. The reports
are generated from an Access Database using Crystal Reports.
Crystal can export to various formats including Word and I would
have thought there would be a way to import/combine several word
documents into 1 but I'm not finding this to be the case. The Insert
facility allows for objects but limited to a single page (even Word
documents).

Right now I'm just trying to come up with a method manually using
Word but not having much luck. I've tried to select an entire 2nd
document and paste into the primary document but the paste ends up
walking over the first page of the document instead of starting at
the location of the cursor it starts at the beginning of the
document. There must be a way, do you have any ideas?

Thanks,

Vic



"Doug Robbins - Word MVP" wrote in message
...
There is no way around this limitation. Can the Crystal Reports be
converted into some text format so that they would not need to be
included as an object, but rather as "ordinary" text that will flow
from one page to the next. That would probably overcome all of
your problems.

If I needed to do something like this, I would be investigating
making direct use from Word of the data that is being use to create
the Crystal Reports and not make use of them at all.

--
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
"Vic" wrote in message
...
Doug,

Hmm - appears that I have a 3rd problem (at least) which I'd
forgotten about because I knew this before I started this little
project. When an object is inserted into word, it is limited to a
single page. Do you know a way around this crazy limitation?

Vic


"Doug Robbins - Word MVP" wrote in
message ...
I believe that the only way to do that will be after executing the
merge to a new document and then run a macro using code that
searches for each tag and at its location inserts the .pdf

Something like

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="tag", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False)
= True
Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
filename:="C:\Temp\T0017.pdf", LinkToFile:=False, _
DisplayAsIcon:=False
Loop
End With

where "tag" is the text of the tag that you have inserted into
the mail merge main 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
"Vic" wrote in message
...
I have a VB6 application that does a mail merge using an Access
database which works fine for database fields. I now have a
requirement that it also do a merge of PDF documents. These
documents will be Crystal reports that will be turned into PDF
files. I will need to insert multiple {tags} that will identify
which PDF file to insert. Can someone tell me how to go about
doing this, maybe some sample code?

I think this will work for inserting the PDF:

Selection.InlineShapes.AddOLEObject
ClassType:="AcroExch.Document.7", _
FileName:="C:\Temp\T0017.pdf", LinkToFile:=False,
DisplayAsIcon:=False

No now I need to know a method of serching for {tags}. Any
ideas? I'm using Word 2007.


Thanks ,


Vic















  #16   Report Post  
Posted to microsoft.public.word.mailmerge.fields
larry larry is offline
external usenet poster
 
Posts: 79
Default Merging PDF Documents



"Doug Robbins - Word MVP" wrote:


You can try AnyBizSoft PDF merger to combine PDF documents. I have tried it
and find it works well. And here is a tutorial to show you how to merge PDF
files.
http://www.anypdftools.com/tutorials...ments.html#201
Hope it helps.
Reply
Thread Tools
Display Modes

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging documents oe New Users 1 September 21st 07 01:52 PM
Merging documents Katie Mailmerge 1 August 9th 06 09:36 PM
merging documents Al New Users 5 July 22nd 06 10:47 PM
Merging documents et New Users 1 April 15th 06 07:40 PM
Merging into New Documents Erika Mailmerge 2 December 30th 04 08:48 PM


All times are GMT +1. The time now is 01:26 AM.

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

About Us

"It's about Microsoft Word"