Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word/excel merge automation
Message
De
25/01/2006 22:46:47
Michael Ouellette
Australian Technical Services (VIC) Pty
Australie
 
 
À
25/01/2006 06:45:38
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01089289
Message ID:
01090383
Vues:
24
This message has been marked as the solution to the initial question of the thread.
I just tried the same process but this time the datasource was a fox table.
Opening the word doc from explorer has the datasource attached ( If I answer yes to the prompt) But opening the very same doc from VFP always has the datasource detached.

I just found if I add this line:
oword.Application.DisplayAlerts = -1
I then get the question to run the SQL statement.
and lo and behold the datasource is attached.

Searching the internet for "run the following sql command" I found this issue is a known "bug"/security feature in Word 2003 and Word 2002 SP3. I have Word 2002 so I changed 11.0 to 10.0 and the fix now works.

The fix
Open Registry Editor.
Start/Run/Regedit
Locate, and then click the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options

Click Edit, point to New, and then click DWORD Value.
Under Name, type:
SQLSecurityCheck

Double-click SQLSecurityCheck.
In the Value data box, type:
00000000

Click OK.

http://support.microsoft.com/default.aspx?scid=KB;EN-US;825765

Seems weird nobody had a problem with your download ( thanks for the code though! ) I guess most programmers are still running with MS Word 97,ha ha

Thanks for your help...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform