Write a MS Word document ? 
Author Message
 Write a MS Word document ?

I was told some time ago that there were utilities available that would
allow me to be able to create a word document from within my fortran
program. Is this true ?  If so, how can I get access to them ?

I am using Compaq Visual FORTRAN v6A on NT.

Thanks,

David

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 Write a MS Word document ?

Quote:

> I was told some time ago that there were utilities available that would
> allow me to be able to create a word document from within my FORTRAN
> program. Is this true ?  If so, how can I get access to them ?

If the format is known (which can be a moving target with Microsoft
stuff), then just like you create any file.  I routinely write
postscript files "directly" from Fortran.

       write(97,'(A36)') ' /L{newpath moveto lineto stroke}def'
       write(97,'(2F10.3,A7)') XX2, YY1, ' lineto'
       write(97,'(2F10.3,A7)') XX, YY, ' moveto'
       write (97,'(A9)') ' showpage'



Wed, 18 Jun 1902 08:00:00 GMT  
 Write a MS Word document ?
Hi David,

Here are some ways to do this:

1) write a RTF file. Word will read/write RTF files without problems. This
is likely the cheapest and most portable solution (RTF are normal text files
with escape sequences for the formatting).

2) CVF has a Module Wizard that you can use to create a module containing
the necessary definitions to access Word as COM/ActiveX server. You can then
open Word from your Fortran programs and add any text/formatting you need to
a document.

3) You can use f90VB to create a Fortran Automation controller for Word.
With f90VB you can access Word through its automation interface without much
work. We have an example in our web site (www.canaimasoft.com/f90VB) that
does this with Excel rather than Word, but Word would be as  easy. The
product is about to be released.

regards,

--
Marco A. Garcia
Canaima Software
P.O. Box 13162
La Jolla, CA. 92039
U.S.A.

Tel/Fax: (619) 233-6831
http://www.canaimasoft.com
Developers of f90SQL the Database Connectivity Solution for Fortran, and
f90VB the library for seamless Fortran-VB and Fortran-OLE Automation
integration


Quote:
> I was told some time ago that there were utilities available that would
> allow me to be able to create a word document from within my FORTRAN
> program. Is this true ?  If so, how can I get access to them ?

> I am using Compaq Visual FORTRAN v6A on NT.

> Thanks,

> David

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 Write a MS Word document ?
If you use your compiler's "Run this system command", named
SYSTEM in most cases, just run the Windows command:
start /wait winword.exe filename.ext
where .ext must be a valid Word file type.

The Start command will do at least two things:
1) Resolve winword.exe; that is you need not know
where winword.exe has been installed to.
2) Queue the winword command as a separate thread and
insure it is completed before returning control to your
Fortran Program.

-|I was told some time ago that there were utilities available that would
-|allow me to be able to create a word document from within my FORTRAN
-|program. Is this true ?  If so, how can I get access to them ?
-|
-|I am using Compaq Visual FORTRAN v6A on NT.
-|
-|Thanks,
-|
-|David
-|
-|
-|Sent via Deja.com http://www.deja.com/
-|Before you buy.

   Herman D. (Skip) Knoble, Research Associate

   Web: http://www.personal.psu.edu/hdk
   Center for Academic Computing
   Penn State University
     214C Computer Building
     University Park, PA 16802-2101
   Phone:+1 814 865-0818   Fax:+1 814 863-7049



Wed, 18 Jun 1902 08:00:00 GMT  
 Write a MS Word document ?
Hi David,

Marco's given the most reasonable methods, imo.  I'd tend towards
either of the last two.  This would mean though, that this application
functionality would depend on an installation of Word existing on a
target machine.  

Below is a link to a sample I put together some time ago using the
second method Marco mentioned (using the CVF Module Wizard).  I
haven't looked at the sample in quite a while, but it should be
adequate to show the idea.

http://users.jagunet.com/~jtermine/f90/WordSample/WordSample.htm
You can click on the filename at the top of each .f90 file to get the
ascii (non-html) source.  There's also a zip file that's accessible.

hth,
John



Quote:
>I was told some time ago that there were utilities available that would
>allow me to be able to create a word document from within my FORTRAN
>program. Is this true ?  If so, how can I get access to them ?

>I am using Compaq Visual FORTRAN v6A on NT.

>Thanks,

>David

>Sent via Deja.com http://www.deja.com/
>Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Printing MS-WORD documents

2. Re : Reading MS Word Document

3. The best solution for printing report into MS Word document

4. Printing Report to MS Word Document

5. MS Word Documents

6. Clipper ->MS Word document?

7. Wanted: module to access MS-Word Documents

8. Reading from MS Word and Excel documents

9. tcom. Print pages from MS Word document

10. Code to recognize MS-Word document files?

11. Class(y) 2.4b, with documentation for MS-Word 97, MS-Word 6.0 and WordPerfect 7.0

12. Writing to a word document Bookmark

 

 
Powered by phpBB® Forum Software