>Hello Gang,
>I have a requirement to populate fields in a Word document with Foxpro data and import a Crystal report as the second page of the doc, what I've got so far is:
>
>I created a template in Word, placed some fields on it, and some code to implement a VFP server ( no problems here )
>
> 1) User enters a value into a Word form field
> 2) User presses enter ( which kicks off a VFP Com server )
> 3) Fields on the doc are populated by the server.
>
>this is where I'm a bit stuck, I know how to start Crystal ( using Com ) and export a report in Word format, however this creates a new Word document, I want to be able to paste the report onto the second page, any ideas??
>
>thanks a lot
>
>Pete Kane
Pete,
I have done this very thing. Once the Crystal report export has run, use Word automation to insert the Crystal report into your Word document.
.Selection.EndKey(wdStory)
.Selection.InsertBreak(wdSectionBreakNextPage)
.Selection.InsertFile('
','',.F.,.F.,.F.)
Hope this helps!
James