Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use Word spellchecker in VFP6?
Message
From
12/08/1999 15:25:12
 
 
To
11/08/1999 15:44:40
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00252687
Message ID:
00253169
Views:
17
On my quest to integrate MS Word spellchecking in my multi-user VFP6 app, I have tried adapting code from John Harvey's Word class. The code which appears below is activated by double-clicking an editbox containing the user's text in a single-form which includes an OLEContainer which contains a Word6document control. The project which is compiled as an .EXE, works on my local PC which has Word 97/v7 installed. It also works over the network which has Word version 6 on the server. But when I run it on a friend's PC, who has Word 97 installed, I get get mess: 'The Windows registration databasse not updated, use Word setup to do this'. This is frustrating because I assume that I am always activating the Winword.exe and Word.Basic class on the server, not the local machine.

Any ideas why this don't work?

Or even, how do you use Word's spellchecker in a multi-user app?

********************************
on error do showmess
set path to l:\sys\apps\msoffice

ddesetoption("SAFETY",.F.) &&prevent dialog prompt
channel = DDEINITIATE("l:\sys\apps\msoffice\WinWord","System")
IF channel < 0 && if channel can't be established just run Word
RUN /N2 l:\sys\apps\msoffice\WinWord.exe
channel = DDEINITIATE("l:\sys\apps\msoffice\WinWord","System")
ENDIF

oWordRef= GetObject('','word.basic')

WITH THISFORM.oWordDoc
.DoVerb(0)
.width=50
.height=20
dumpit=asummary
#DEFINE C_MESS1_LOC dumpit
oWordRef.Insert(C_MESS1_LOC)
oWordRef.EditGoTo("\StartofDoc")

on error do shchecked
oWordRef.ToolsSpelling
on error
oWordRef.editselectall
oWordRef.editcopy &&into clipboard
asummary=_cliptext
thisform.pageform1.page1.edtasummary7.value=asummary
ENDWITH

DDETERMINATE(channel) &&close channel
Previous
Reply
Map
View

Click here to load this message in the networking platform