Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word.Basic vs Word.Application
Message
De
29/12/1999 10:09:49
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
27/12/1999 10:35:33
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00308758
Message ID:
00309834
Vues:
29
Some additon to those that already has been said John,
Syntax difference - yes, functionality difference ? (at leats I couldn't see)

You can't use word.application in versions older than Word97. But you could do reverse. Word97 and up not only suppport word.basic but word.application has a "wordbasic" object as well. That means you could embed wordbasic syntax in word.application. ie:
oWord = createobject("word.application")
oWord.Documents.Open(lcTemplate)
* Equivalant to
oWord.WordBasic.Fileopen(lcTemplate)

oWord.ActiveDocument.Bookmarks.Add("myBookmark")
* Equivalant to
oWord.WordBasic.Editgoto("myBookmark",1)
etc.
Preference is arguable. If my customers are mixed with word versions then I would try to create and use "word.basic" otherwise "application" which is more flexible.
Be warned : Not all word.basic commands work in Word97 and up as they do in older versions. Or not all them work in older versions as they do in word97 and up. In short if possible use word.application.
Cetin


>Hi, and thanks again for the reply. Is there any syntax or functionality difference between the two?
>
>>Hi,
>> As far as my research on MS word automation, word.application was originally used for Office97 and above. You may use word.basic to automate Office97 and above. However, you may get error if you use word.application to automate office95.
>> Please correct me if I am wrong.
>>
>>Hope it helps
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform