Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving data to Word

Status
Not open for further replies.

Brezhnev

Programmer
Sep 25, 2002
53
CA
Hi all!
Question is short: i need to save different types of data (tables, graphs, text etc.) to the Word document. So I created object ‘Word.Application’ and currently playing with that. Already able to save some graphs and print it ... Can somebody please point me to some examples 'cause i am having tough time figuring out syntax.

Thanks
 
Brezhnev,

The VBA Help file for Word is one source of information. This is not installed by default; it is an option when you install Office.

I also find the Object Browser in VBA to be very useful, plus Intellisense in VFP 7.0 and 8.0.

Mike


Mike Lewis
Edinburgh, Scotland
 
thanks a lot Mike ... but that's exactly my problem -- all code is available in VB and sometimes I just can't figure out VFP equivalent ... BTW , I have another question for you :) You did work with MSChart, right? I am using your class SimpleChart for testing and am very happy with results.
But since I need to modify it for my own needs, questions:
1. very stupid question -- how can I declare overall size ( it's too small ) and how come 3d types always smaller then 2d ?
2. can I save/print created chart to Excel?

Thanks again for your continues help in this forum
 
Brezhnev,

I know the problem with VB -- I also have difficulty translating it to VFP. But at least the help file, object browser, etc. give you the object model, which is the most important thing to understand.

Actually, there is a better source of information -- if you don't mind spending some money. There is a book called Microsoft Office Automation with Visual FoxPro, by Tamar Granor and Della Martin. If you are in the US, you can buy it on-line at (or from larger bookstores). If not, there is some information on it on my own web site, at
Re your SimpleChart questions. It's probably better to start a new thread for those. That way, other people who are interested will see it. However, I'll try to answer your questions here:

1. You want to make the chart itself bigger or smaller? If so, just resize the control after you put it on the form. Do you want to do that at run-time? Change its Height and Width properties.

Why are 3D charts smaller than 2D? Don't know. I didn't know they were.

2. Copying to Excel. Yes. See the article at . There is some code there to paste and print the chart to Word. It should be easy to adapt it for Excel. If you can't, let me know and I'll do it myself.

Mike



Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top