Board index » delphi » OLE w/ word97 saved in rtf format

OLE w/ word97 saved in rtf format

In my program I need to open a file in word and then save it in RTF
format and word 95/6.0 format for some customers.  I created a macro
in word and noticed that the fileformat specified for the word 95/6.0
was an integer 104.  No problem, I can make delpi do that find.  Now
when I create a macro to save it in RTF the file format is
wdFormatRTF.  If I put this in my delpi call it doesn't like it.
Calls it an undefined variable.  Looking in the VBAWRD8.hlp file I
find that the call can be either with a constant (like wdFormatRTF) or
with a values.  Does anybody know how I can find out this value.  I
have done a text search for the word wdFormatRTF in all my files on
the harddrive.  The program is getting it from somewhere in VBA.  Any
help would be greatly appreciated.

 

Re:OLE w/ word97 saved in rtf format


On Thu, 23 Apr 1998 19:09:57 GMT, mmosb...@datasync.com (Michael

Quote
Mosbauer) wrote:
>In my program I need to open a file in word and then save it in RTF
>format and word 95/6.0 format for some customers.  I created a macro
>in word and noticed that the fileformat specified for the word 95/6.0
>was an integer 104.  No problem, I can make delpi do that find.  Now
>when I create a macro to save it in RTF the file format is
>wdFormatRTF.  If I put this in my delpi call it doesn't like it.
>Calls it an undefined variable.  Looking in the VBAWRD8.hlp file I
>find that the call can be either with a constant (like wdFormatRTF) or
>with a values.  Does anybody know how I can find out this value.  I
>have done a text search for the word wdFormatRTF in all my files on
>the harddrive.  The program is getting it from somewhere in VBA.  Any
>help would be greatly appreciated.

I found the answer to my own question.   Just in case somebody else
has the same question here is wher you can find it.  From the vb
editor press F2 to bring up the object browser.  This is very handy.
Select global (I believe it is by default) and there you will find all
the constants.  Once you select the one you are interested in you will
see the value at the bottom.  

Re:OLE w/ word97 saved in rtf format


Quote
Michael Mosbauer writes:
>...I find that the call can be either with a constant (like wdFormatRTF)
or with a values.
> Does anybody know how I can find out this value.  

Invoke the menu command Project | Import Type Library then open the type
library C:\Program Files\Microsoft Office\Office\Msword8.olb.  It will
generate Delphi definitions.  A lot easier!

Matthew Greet

Other Threads