I have an exe I think was originally created in vfp 5 , has been upgraded to
8 and then to 9. It creates a word document and populates it with variables
created in same exe. The problem is it will only print correctly if word 97
is the only version of word on the computer running it. The part that
doesn't print properly is a variable that uses chr(13)+chr(10). The newer
versions of word do not have the carriage return . Only a space.
I don't know what to look for ?
thanks
sherry

Re: print with word97 by Bernhard

Bernhard
Tue Aug 15 12:37:39 CDT 2006

Hi sherry,

> I have an exe I think was originally created in vfp 5 , has been upgraded to
> 8 and then to 9. It creates a word document and populates it with variables
> created in same exe. The problem is it will only print correctly if word 97
> is the only version of word on the computer running it. The part that
> doesn't print properly is a variable that uses chr(13)+chr(10). The newer
> versions of word do not have the carriage return . Only a space.
Maybe you give us some lines of code around your problem and some more info of
what should happen in word.
Word in all versions does know about carriage return and line feed. And I don't
know of any version of word, where carriage return is replaced by space.

Regards
Bernhard Sander

Re: print with word97 by sherry

sherry
Tue Aug 15 13:07:01 CDT 2006

Hi
Here is some code I don't know if it is all you might need.

This section of code creates the variable---
DO CASE
CASE laChangeSchedule[lnI,2] = 0
This.outValue = This.outValue + 'None Thereafter' +CHR(13)+ CHR(10)
OTHERWISE
IF lcPBFCode = 'LIF'
laChangeSchedule[lnI,2] = ROUND(laChangeSchedule[lnI,2], 0)
ELSE
laChangeSchedule[lnI,2] = INT(laChangeSchedule[lnI,2])
ENDIF
This.outValue = This.outValue + ALLTRIM(TRANSFORM(laChangeSchedule[lnI,2],
'$,$$$,$$9.99')) + ', ' + lcYear +CHR(13)+ CHR(10)
ENDCASE



THIS SECTION GETS SAVED OBJECT FROM MEMO FIELD


COPY MEMO publhpdc.pdcfile TO (lcFileName)
loDocument = GETOBJECT(lcFileName)
loDocument.Activate



THIS SECTION DEFINES OLE PRINT IMAGE


LOCAL lcRegistryName, lnRegistryKey, lcRegistryLookupValue, lnSubKey,
lnRtnValue, lcKeyValueName, llError

#DEFINE HKEY_CLASSES_ROOT -2147483648 && BITSET(0,31)

LOCAL nHKey, cSubKey, nResult, lpszValueName, dwReserved, lpdwType,
lpbData, lpcbData
DECLARE Integer RegOpenKey IN Win32API Integer nHKey, String @cSubKey,
Integer @nResult
DECLARE Integer RegCloseKey IN Win32API Integer nHKey
DECLARE Integer RegQueryValueEx IN Win32API Integer nHKey, String
lpszValueName, Integer dwReserved, Integer @lpdwType, String @lpbData,
Integer @lpcbData

llError = .F.
lnRegistryKey = HKEY_CLASSES_ROOT
lcRegistryLookupValue = 'CLSID\{6D940280-9F11-11CE-83FD-02608C3EC08A}\ProgID'
lnSubKey = 0
lnRtnValue = RegOpenKey(lnRegistryKey, lcRegistryLookupValue, @lnSubKey)
IF lnRtnValue != 0 && An Error Occurred Trying to Find the Key
llError = .T.
ELSE
lcKeyValueName = ''
lpbData = SPACE(256)
lpcbData = LEN(lpbData)
STORE 0 TO lpdwReserved, lpdwType
lnRtnValue = RegQueryValueEx(lnSubKey, lcKeyValueName, lpdwReserved,
@lpdwType, @lpbData, @lpcbData)
=RegCloseKey(lnSubKey)
IF lnRtnValue != 0
llError = .T.
ENDIF
ENDIF

CLEAR DLLS

IF llError = .F.
This.intImageObjRegistered = .T.
lcRegistryName = LEFT(lpbData, lpcbData)
This.AddObject('olePrintImage', 'oleControl', lcRegistryName)
This.olePrintImage.Left = -20
ELSE
WAIT 'Image Printing Control Not Available' WINDOW
ENDIF






"Bernhard Sander" wrote:

> Hi sherry,
>
> > I have an exe I think was originally created in vfp 5 , has been upgraded to
> > 8 and then to 9. It creates a word document and populates it with variables
> > created in same exe. The problem is it will only print correctly if word 97
> > is the only version of word on the computer running it. The part that
> > doesn't print properly is a variable that uses chr(13)+chr(10). The newer
> > versions of word do not have the carriage return . Only a space.
> Maybe you give us some lines of code around your problem and some more info of
> what should happen in word.
> Word in all versions does know about carriage return and line feed. And I don't
> know of any version of word, where carriage return is replaced by space.
>
> Regards
> Bernhard Sander
>

Re: print with word97 by Bernhard

Bernhard
Tue Aug 15 13:51:41 CDT 2006

Hi sherry,

> Hi
> Here is some code I don't know if it is all you might need.
> ...
In which way are all these lines of code related to Word?
Where is the variable this.outValue sent to Word?

Regards
Bernhard Sander


Re: print with word97 by sherry

sherry
Tue Aug 15 14:29:02 CDT 2006

Hi
This might be what you want.
I didn't write the code, I'm only trying to solve this problem.


LOCAL loWord, lcFile, loMessage

loMessage = Thisform.Screen
loMessage.DisplayMsgStatus('Please Wait - Retrieving Document')
Thisform.Draw

DO WHILE .T.
lcFile = SYS(2023) + '\' + SUBSTR(SYS(2015), 2) + '.TMP'
IF FILE(lcFile) = .F.
EXIT
ENDIF
ENDDO

IF SEEK(cgrd_doc.zzzkey, 'publhpdc', 'k_zzzkey') = .T. AND
EMPTY(publhpdc.pdcfile) = .F.
COPY MEMO publhpdc.pdcfile TO (lcFile)
WITH Thisform
.Tempfilecount = .TempFileCount + 1
DIMENSION .Tempfilelist[.TempFileCount]
.TempfileList[.TempFilecount] = lcFile
ENDWITH
TRY
loWord = GETOBJECT(lcFile)
loWord.Application.Documents.Open(lcFile)
loWord.Application.Visible = .T.
loWord.Application.Activate
loMessage.DisplayMsgStatus('')
CATCH
loMessage.DisplayMsgWarning('Unable to Locate MS Word')
ENDTRY
ELSE
loMessage.DisplayMsgWarning('There is no Document File to Display')
ENDIF


thanks
sherry


"Bernhard Sander" wrote:

> Hi sherry,
>
> > Hi
> > Here is some code I don't know if it is all you might need.
> > ...
> In which way are all these lines of code related to Word?
> Where is the variable this.outValue sent to Word?
>
> Regards
> Bernhard Sander
>
>

Re: print with word97 by Dan

Dan
Tue Aug 15 15:40:12 CDT 2006

No, it won't help. But it's closer.

I see a LOCAL declaration for lcFile, and then it's set to a random file
name with the extension TMP.

You then Getobject() on that file to try to open Word, but that's not the
filetype that Word operates with when using Getobject(). Lord only knows
what kind of object you're getting, but apparently it has a documents
collection because it's not blowing up there (or at least you haven't said
it's blowing up there).

And you STILL haven't shown how you're getting data into Word. This code
just opens a doc (I presume) stored in a memo field and displays it. There's
no data manipulation here at all.

Dan



sherry wrote:
> Hi
> This might be what you want.
> I didn't write the code, I'm only trying to solve this problem.
>
>
> LOCAL loWord, lcFile, loMessage
>
> loMessage = Thisform.Screen
> loMessage.DisplayMsgStatus('Please Wait - Retrieving Document')
> Thisform.Draw
>
> DO WHILE .T.
> lcFile = SYS(2023) + '\' + SUBSTR(SYS(2015), 2) + '.TMP'
> IF FILE(lcFile) = .F.
> EXIT
> ENDIF
> ENDDO
>
> IF SEEK(cgrd_doc.zzzkey, 'publhpdc', 'k_zzzkey') = .T. AND
> EMPTY(publhpdc.pdcfile) = .F.
> COPY MEMO publhpdc.pdcfile TO (lcFile)
> WITH Thisform
> .Tempfilecount = .TempFileCount + 1
> DIMENSION .Tempfilelist[.TempFileCount]
> .TempfileList[.TempFilecount] = lcFile
> ENDWITH
> TRY
> loWord = GETOBJECT(lcFile)
> loWord.Application.Documents.Open(lcFile)
> loWord.Application.Visible = .T.
> loWord.Application.Activate
> loMessage.DisplayMsgStatus('')
> CATCH
> loMessage.DisplayMsgWarning('Unable to Locate MS Word')
> ENDTRY
> ELSE
> loMessage.DisplayMsgWarning('There is no Document File to Display')
> ENDIF
>
>
> thanks
> sherry
>
>
> "Bernhard Sander" wrote:
>
>> Hi sherry,
>>
>>> Hi
>>> Here is some code I don't know if it is all you might need.
>> > ...
>> In which way are all these lines of code related to Word?
>> Where is the variable this.outValue sent to Word?
>>
>> Regards
>> Bernhard Sander



Re: print with word97 by sherry

sherry
Tue Aug 15 16:01:01 CDT 2006

HI again
the original document is created and saved in a memo field as a merge print
document.
It uses those variables as the merge fields.

I can not copy and paste the memo field to you.


"Dan Freeman" wrote:

> No, it won't help. But it's closer.
>
> I see a LOCAL declaration for lcFile, and then it's set to a random file
> name with the extension TMP.
>
> You then Getobject() on that file to try to open Word, but that's not the
> filetype that Word operates with when using Getobject(). Lord only knows
> what kind of object you're getting, but apparently it has a documents
> collection because it's not blowing up there (or at least you haven't said
> it's blowing up there).
>
> And you STILL haven't shown how you're getting data into Word. This code
> just opens a doc (I presume) stored in a memo field and displays it. There's
> no data manipulation here at all.
>
> Dan
>
>
>
> sherry wrote:
> > Hi
> > This might be what you want.
> > I didn't write the code, I'm only trying to solve this problem.
> >
> >
> > LOCAL loWord, lcFile, loMessage
> >
> > loMessage = Thisform.Screen
> > loMessage.DisplayMsgStatus('Please Wait - Retrieving Document')
> > Thisform.Draw
> >
> > DO WHILE .T.
> > lcFile = SYS(2023) + '\' + SUBSTR(SYS(2015), 2) + '.TMP'
> > IF FILE(lcFile) = .F.
> > EXIT
> > ENDIF
> > ENDDO
> >
> > IF SEEK(cgrd_doc.zzzkey, 'publhpdc', 'k_zzzkey') = .T. AND
> > EMPTY(publhpdc.pdcfile) = .F.
> > COPY MEMO publhpdc.pdcfile TO (lcFile)
> > WITH Thisform
> > .Tempfilecount = .TempFileCount + 1
> > DIMENSION .Tempfilelist[.TempFileCount]
> > .TempfileList[.TempFilecount] = lcFile
> > ENDWITH
> > TRY
> > loWord = GETOBJECT(lcFile)
> > loWord.Application.Documents.Open(lcFile)
> > loWord.Application.Visible = .T.
> > loWord.Application.Activate
> > loMessage.DisplayMsgStatus('')
> > CATCH
> > loMessage.DisplayMsgWarning('Unable to Locate MS Word')
> > ENDTRY
> > ELSE
> > loMessage.DisplayMsgWarning('There is no Document File to Display')
> > ENDIF
> >
> >
> > thanks
> > sherry
> >
> >
> > "Bernhard Sander" wrote:
> >
> >> Hi sherry,
> >>
> >>> Hi
> >>> Here is some code I don't know if it is all you might need.
> >> > ...
> >> In which way are all these lines of code related to Word?
> >> Where is the variable this.outValue sent to Word?
> >>
> >> Regards
> >> Bernhard Sander
>
>
>

Re: print with word97 by Dan

Dan
Tue Aug 15 16:09:44 CDT 2006

Didn't you ask about a problem getting data into Word?

If you don't have code somewhere that puts data into Word, you don't have a
problem getting data into Word. <g>

Perhaps you should state your problem again.

Dan

sherry wrote:
> HI again
> the original document is created and saved in a memo field as a
> merge print document.
> It uses those variables as the merge fields.
>
> I can not copy and paste the memo field to you.
>
>
> "Dan Freeman" wrote:
>
>> No, it won't help. But it's closer.
>>
>> I see a LOCAL declaration for lcFile, and then it's set to a random
>> file name with the extension TMP.
>>
>> You then Getobject() on that file to try to open Word, but that's
>> not the filetype that Word operates with when using Getobject().
>> Lord only knows what kind of object you're getting, but apparently
>> it has a documents collection because it's not blowing up there (or
>> at least you haven't said it's blowing up there).
>>
>> And you STILL haven't shown how you're getting data into Word. This
>> code just opens a doc (I presume) stored in a memo field and
>> displays it. There's no data manipulation here at all.
>>
>> Dan
>>
>>
>>
>> sherry wrote:
>>> Hi
>>> This might be what you want.
>>> I didn't write the code, I'm only trying to solve this problem.
>>>
>>>
>>> LOCAL loWord, lcFile, loMessage
>>>
>>> loMessage = Thisform.Screen
>>> loMessage.DisplayMsgStatus('Please Wait - Retrieving Document')
>>> Thisform.Draw
>>>
>>> DO WHILE .T.
>>> lcFile = SYS(2023) + '\' + SUBSTR(SYS(2015), 2) + '.TMP'
>>> IF FILE(lcFile) = .F.
>>> EXIT
>>> ENDIF
>>> ENDDO
>>>
>>> IF SEEK(cgrd_doc.zzzkey, 'publhpdc', 'k_zzzkey') = .T. AND
>>> EMPTY(publhpdc.pdcfile) = .F.
>>> COPY MEMO publhpdc.pdcfile TO (lcFile)
>>> WITH Thisform
>>> .Tempfilecount = .TempFileCount + 1
>>> DIMENSION .Tempfilelist[.TempFileCount]
>>> .TempfileList[.TempFilecount] = lcFile
>>> ENDWITH
>>> TRY
>>> loWord = GETOBJECT(lcFile)
>>> loWord.Application.Documents.Open(lcFile)
>>> loWord.Application.Visible = .T.
>>> loWord.Application.Activate
>>> loMessage.DisplayMsgStatus('')
>>> CATCH
>>> loMessage.DisplayMsgWarning('Unable to Locate MS Word')
>>> ENDTRY
>>> ELSE
>>> loMessage.DisplayMsgWarning('There is no Document File to Display')
>>> ENDIF
>>>
>>>
>>> thanks
>>> sherry
>>>
>>>
>>> "Bernhard Sander" wrote:
>>>
>>>> Hi sherry,
>>>>
>>>>> Hi
>>>>> Here is some code I don't know if it is all you might need.
>>>> > ...
>>>> In which way are all these lines of code related to Word?
>>>> Where is the variable this.outValue sent to Word?
>>>>
>>>> Regards
>>>> Bernhard Sander



Re: print with word97 by sherry

sherry
Tue Aug 15 18:48:01 CDT 2006

Hi
the problem is...

The printed report should read:
2.37 year one,
4.35 year two,
7.85 therafter.

It read like this if word 97 is the only version of word installed on pc.

It reads like:
2.37 year one, 4.35 year two, 7.85 therafter.
It reads like this in any other version of word 2000 or 2003 and vfp 8 or 9

thanks
sherry

"Dan Freeman" wrote:

> Didn't you ask about a problem getting data into Word?
>
> If you don't have code somewhere that puts data into Word, you don't have a
> problem getting data into Word. <g>
>
> Perhaps you should state your problem again.
>
> Dan
>
> sherry wrote:
> > HI again
> > the original document is created and saved in a memo field as a
> > merge print document.
> > It uses those variables as the merge fields.
> >
> > I can not copy and paste the memo field to you.
> >
> >
> > "Dan Freeman" wrote:
> >
> >> No, it won't help. But it's closer.
> >>
> >> I see a LOCAL declaration for lcFile, and then it's set to a random
> >> file name with the extension TMP.
> >>
> >> You then Getobject() on that file to try to open Word, but that's
> >> not the filetype that Word operates with when using Getobject().
> >> Lord only knows what kind of object you're getting, but apparently
> >> it has a documents collection because it's not blowing up there (or
> >> at least you haven't said it's blowing up there).
> >>
> >> And you STILL haven't shown how you're getting data into Word. This
> >> code just opens a doc (I presume) stored in a memo field and
> >> displays it. There's no data manipulation here at all.
> >>
> >> Dan
> >>
> >>
> >>
> >> sherry wrote:
> >>> Hi
> >>> This might be what you want.
> >>> I didn't write the code, I'm only trying to solve this problem.
> >>>
> >>>
> >>> LOCAL loWord, lcFile, loMessage
> >>>
> >>> loMessage = Thisform.Screen
> >>> loMessage.DisplayMsgStatus('Please Wait - Retrieving Document')
> >>> Thisform.Draw
> >>>
> >>> DO WHILE .T.
> >>> lcFile = SYS(2023) + '\' + SUBSTR(SYS(2015), 2) + '.TMP'
> >>> IF FILE(lcFile) = .F.
> >>> EXIT
> >>> ENDIF
> >>> ENDDO
> >>>
> >>> IF SEEK(cgrd_doc.zzzkey, 'publhpdc', 'k_zzzkey') = .T. AND
> >>> EMPTY(publhpdc.pdcfile) = .F.
> >>> COPY MEMO publhpdc.pdcfile TO (lcFile)
> >>> WITH Thisform
> >>> .Tempfilecount = .TempFileCount + 1
> >>> DIMENSION .Tempfilelist[.TempFileCount]
> >>> .TempfileList[.TempFilecount] = lcFile
> >>> ENDWITH
> >>> TRY
> >>> loWord = GETOBJECT(lcFile)
> >>> loWord.Application.Documents.Open(lcFile)
> >>> loWord.Application.Visible = .T.
> >>> loWord.Application.Activate
> >>> loMessage.DisplayMsgStatus('')
> >>> CATCH
> >>> loMessage.DisplayMsgWarning('Unable to Locate MS Word')
> >>> ENDTRY
> >>> ELSE
> >>> loMessage.DisplayMsgWarning('There is no Document File to Display')
> >>> ENDIF
> >>>
> >>>
> >>> thanks
> >>> sherry
> >>>
> >>>
> >>> "Bernhard Sander" wrote:
> >>>
> >>>> Hi sherry,
> >>>>
> >>>>> Hi
> >>>>> Here is some code I don't know if it is all you might need.
> >>>> > ...
> >>>> In which way are all these lines of code related to Word?
> >>>> Where is the variable this.outValue sent to Word?
> >>>>
> >>>> Regards
> >>>> Bernhard Sander
>
>
>

Re: print with word97 by Dan

Dan
Wed Aug 16 11:56:48 CDT 2006

This sounds like a word problem. You should probably ask in a Word
newsgroup.

(microsoft.public.word.docmanagement is where I'd start)

Dan

sherry wrote:
> Hi
> the problem is...
>
> The printed report should read:
> 2.37 year one,
> 4.35 year two,
> 7.85 therafter.
>
> It read like this if word 97 is the only version of word installed on
> pc.
>
> It reads like:
> 2.37 year one, 4.35 year two, 7.85 therafter.
> It reads like this in any other version of word 2000 or 2003 and vfp
> 8 or 9
>
> thanks
> sherry
>
> "Dan Freeman" wrote:
>
>> Didn't you ask about a problem getting data into Word?
>>
>> If you don't have code somewhere that puts data into Word, you don't
>> have a problem getting data into Word. <g>
>>
>> Perhaps you should state your problem again.
>>
>> Dan
>>
>> sherry wrote:
>>> HI again
>>> the original document is created and saved in a memo field as a
>>> merge print document.
>>> It uses those variables as the merge fields.
>>>
>>> I can not copy and paste the memo field to you.
>>>
>>>
>>> "Dan Freeman" wrote:
>>>
>>>> No, it won't help. But it's closer.
>>>>
>>>> I see a LOCAL declaration for lcFile, and then it's set to a random
>>>> file name with the extension TMP.
>>>>
>>>> You then Getobject() on that file to try to open Word, but that's
>>>> not the filetype that Word operates with when using Getobject().
>>>> Lord only knows what kind of object you're getting, but apparently
>>>> it has a documents collection because it's not blowing up there (or
>>>> at least you haven't said it's blowing up there).
>>>>
>>>> And you STILL haven't shown how you're getting data into Word. This
>>>> code just opens a doc (I presume) stored in a memo field and
>>>> displays it. There's no data manipulation here at all.
>>>>
>>>> Dan
>>>>
>>>>
>>>>
>>>> sherry wrote:
>>>>> Hi
>>>>> This might be what you want.
>>>>> I didn't write the code, I'm only trying to solve this problem.
>>>>>
>>>>>
>>>>> LOCAL loWord, lcFile, loMessage
>>>>>
>>>>> loMessage = Thisform.Screen
>>>>> loMessage.DisplayMsgStatus('Please Wait - Retrieving Document')
>>>>> Thisform.Draw
>>>>>
>>>>> DO WHILE .T.
>>>>> lcFile = SYS(2023) + '\' + SUBSTR(SYS(2015), 2) + '.TMP'
>>>>> IF FILE(lcFile) = .F.
>>>>> EXIT
>>>>> ENDIF
>>>>> ENDDO
>>>>>
>>>>> IF SEEK(cgrd_doc.zzzkey, 'publhpdc', 'k_zzzkey') = .T. AND
>>>>> EMPTY(publhpdc.pdcfile) = .F.
>>>>> COPY MEMO publhpdc.pdcfile TO (lcFile)
>>>>> WITH Thisform
>>>>> .Tempfilecount = .TempFileCount + 1
>>>>> DIMENSION .Tempfilelist[.TempFileCount]
>>>>> .TempfileList[.TempFilecount] = lcFile
>>>>> ENDWITH
>>>>> TRY
>>>>> loWord = GETOBJECT(lcFile)
>>>>> loWord.Application.Documents.Open(lcFile)
>>>>> loWord.Application.Visible = .T.
>>>>> loWord.Application.Activate
>>>>> loMessage.DisplayMsgStatus('')
>>>>> CATCH
>>>>> loMessage.DisplayMsgWarning('Unable to Locate MS Word')
>>>>> ENDTRY
>>>>> ELSE
>>>>> loMessage.DisplayMsgWarning('There is no Document File to
>>>>> Display') ENDIF
>>>>>
>>>>>
>>>>> thanks
>>>>> sherry
>>>>>
>>>>>
>>>>> "Bernhard Sander" wrote:
>>>>>
>>>>>> Hi sherry,
>>>>>>
>>>>>>> Hi
>>>>>>> Here is some code I don't know if it is all you might need.
>>>>>> > ...
>>>>>> In which way are all these lines of code related to Word?
>>>>>> Where is the variable this.outValue sent to Word?
>>>>>>
>>>>>> Regards
>>>>>> Bernhard Sander



Re: print with word97 by sherry

sherry
Wed Aug 16 12:29:03 CDT 2006

Thanks
I had tried Word exchange but I will try it again.
I recreated the document in word 2003 and got the same results.

thanks again for all your help
sherry

"Dan Freeman" wrote:

> This sounds like a word problem. You should probably ask in a Word
> newsgroup.
>
> (microsoft.public.word.docmanagement is where I'd start)
>
> Dan
>
> sherry wrote:
> > Hi
> > the problem is...
> >
> > The printed report should read:
> > 2.37 year one,
> > 4.35 year two,
> > 7.85 therafter.
> >
> > It read like this if word 97 is the only version of word installed on
> > pc.
> >
> > It reads like:
> > 2.37 year one, 4.35 year two, 7.85 therafter.
> > It reads like this in any other version of word 2000 or 2003 and vfp
> > 8 or 9
> >
> > thanks
> > sherry
> >
> > "Dan Freeman" wrote:
> >
> >> Didn't you ask about a problem getting data into Word?
> >>
> >> If you don't have code somewhere that puts data into Word, you don't
> >> have a problem getting data into Word. <g>
> >>
> >> Perhaps you should state your problem again.
> >>
> >> Dan
> >>
> >> sherry wrote:
> >>> HI again
> >>> the original document is created and saved in a memo field as a
> >>> merge print document.
> >>> It uses those variables as the merge fields.
> >>>
> >>> I can not copy and paste the memo field to you.
> >>>
> >>>
> >>> "Dan Freeman" wrote:
> >>>
> >>>> No, it won't help. But it's closer.
> >>>>
> >>>> I see a LOCAL declaration for lcFile, and then it's set to a random
> >>>> file name with the extension TMP.
> >>>>
> >>>> You then Getobject() on that file to try to open Word, but that's
> >>>> not the filetype that Word operates with when using Getobject().
> >>>> Lord only knows what kind of object you're getting, but apparently
> >>>> it has a documents collection because it's not blowing up there (or
> >>>> at least you haven't said it's blowing up there).
> >>>>
> >>>> And you STILL haven't shown how you're getting data into Word. This
> >>>> code just opens a doc (I presume) stored in a memo field and
> >>>> displays it. There's no data manipulation here at all.
> >>>>
> >>>> Dan
> >>>>
> >>>>
> >>>>
> >>>> sherry wrote:
> >>>>> Hi
> >>>>> This might be what you want.
> >>>>> I didn't write the code, I'm only trying to solve this problem.
> >>>>>
> >>>>>
> >>>>> LOCAL loWord, lcFile, loMessage
> >>>>>
> >>>>> loMessage = Thisform.Screen
> >>>>> loMessage.DisplayMsgStatus('Please Wait - Retrieving Document')
> >>>>> Thisform.Draw
> >>>>>
> >>>>> DO WHILE .T.
> >>>>> lcFile = SYS(2023) + '\' + SUBSTR(SYS(2015), 2) + '.TMP'
> >>>>> IF FILE(lcFile) = .F.
> >>>>> EXIT
> >>>>> ENDIF
> >>>>> ENDDO
> >>>>>
> >>>>> IF SEEK(cgrd_doc.zzzkey, 'publhpdc', 'k_zzzkey') = .T. AND
> >>>>> EMPTY(publhpdc.pdcfile) = .F.
> >>>>> COPY MEMO publhpdc.pdcfile TO (lcFile)
> >>>>> WITH Thisform
> >>>>> .Tempfilecount = .TempFileCount + 1
> >>>>> DIMENSION .Tempfilelist[.TempFileCount]
> >>>>> .TempfileList[.TempFilecount] = lcFile
> >>>>> ENDWITH
> >>>>> TRY
> >>>>> loWord = GETOBJECT(lcFile)
> >>>>> loWord.Application.Documents.Open(lcFile)
> >>>>> loWord.Application.Visible = .T.
> >>>>> loWord.Application.Activate
> >>>>> loMessage.DisplayMsgStatus('')
> >>>>> CATCH
> >>>>> loMessage.DisplayMsgWarning('Unable to Locate MS Word')
> >>>>> ENDTRY
> >>>>> ELSE
> >>>>> loMessage.DisplayMsgWarning('There is no Document File to
> >>>>> Display') ENDIF
> >>>>>
> >>>>>
> >>>>> thanks
> >>>>> sherry
> >>>>>
> >>>>>
> >>>>> "Bernhard Sander" wrote:
> >>>>>
> >>>>>> Hi sherry,
> >>>>>>
> >>>>>>> Hi
> >>>>>>> Here is some code I don't know if it is all you might need.
> >>>>>> > ...
> >>>>>> In which way are all these lines of code related to Word?
> >>>>>> Where is the variable this.outValue sent to Word?
> >>>>>>
> >>>>>> Regards
> >>>>>> Bernhard Sander
>
>
>