Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE-Word
Message
From
05/10/1998 09:39:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/10/1998 09:27:12
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00143845
Message ID:
00143848
Views:
17
>Hello,
> I got the sample from MS about the automation of MS Word. I don't understand with some statement....anyobe can help me???
> It is in VB code.
> set appword = createobject('word.application')
> with appword
> .documents.adds
> .selection.typetext text:="this is testing"
> .activedocuments.printout background:=false
> end with
>
> What does "typetext" and "background" meant????how to convert this syntax to vfp??

typetext is a method and background is a parameter. You need positions of them as stated in vbawrd8.hlp.
.selection.typetext("this is testing")
*PrintOut(Background, Append, Range, OutputFileName, From, To, Item, Copies, Pages, PageType, PrintToFile, Collate, FileName, ActivePrinterMacGX, ManualDuplexPrint)
* All params are optional - so you could only include background option
 .activedocument.printout(.f.)
Converted code :
appword = createobject('word.application')
with appword
   .visible = .t. && So we can see word app
   .documents.add()
   .selection.typetext("this is testing")
   .activedocument.printout(.f.)
endwith
Cetin
Ç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
Previous
Reply
Map
View

Click here to load this message in the networking platform