Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print word file in a report
Message
From
04/10/2011 22:07:44
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 5
OS:
Windows 7
Miscellaneous
Thread ID:
01525604
Message ID:
01525609
Views:
34
>>Hi All:
>>
>>I have a report that prints a page per customer, with a field that contains a memo field from the customer table. 'Stretch with overflow' is checked.
>>
>>I now want to put an entire word file that's associated with the customer in the field instead of the memo field.
>>
>>What is the general appraoch you would take? Some sample code would be much appreciated, since I am far from an automation expert.
>>
>>Can I save the entire file to a variable? What would the limitation then be on the size? How would the lines wrap? And so on...
>>
>>Thanks,
>>
>>Yossi
>
>Would not it be easier to use Word instead of Report then?

The report exists.

It contains other items of information on the page.

I might be reporting on a bunch of customers. My system is that I I have a Word file for each customer. e.g. Customer 'ABC01' has a file called 'ABC01.DOCX' and so on. So when I print the report, my idea would be to put retrieveword(custno) in the field instead of custmemo in the field. I would then have a function that would say:
function retrieveword(tcCustno)

lcFileName = tcCustno + .DOCX'
open the lcFileName word file
retparm = entire contents of the file, with wordwrap suitable for the report field
return retparm
Yossi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform