Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Document
Message
From
22/12/2006 14:18:25
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01179814
Message ID:
01179819
Views:
6
This message has been marked as the solution to the initial question of the thread.
>Hello.
>
>I'm writing text to a word document using these sentences:
>
>objWDdoc=CREATEOBJECT("word.document")
>objWDdoc.content.InsertAfter("Some Text")
>
>How can I add Courier New and Bold text to some part of the document ?
>
>Thank you.
>
>c.x.

It will be something like this:
oWord=CREATEOBJECT('Word.Application')
oWord.Documents.Add
oWord.Visible=.t.
oWord.documents(1).Content.InsertAfter('Some Text')
oWord.documents(1).paragraphs(1).range.Font.name='Courier New'
oWord.documents(1).paragraphs(1).range.Font.bold=.t.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform