Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to copy all words from .rtf to new .doc file
Message
From
25/01/2008 08:30:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/01/2008 07:00:03
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01285452
Message ID:
01285473
Views:
19
>Hi,
>
>How can i open a .rtf file and copy all inside words (include fonts,size,color... ) into a selected WinWord file.

Didn't you ask the same question yesterday?

Open .rtf with word. Select all. Copy, paste in other doc. In code it looks like:
#DEFINE wdCollapseStart	1	
#DEFINE wdCollapseEnd	0	

lcDoc = GETFILE('doc')
lcRTF = GETFILE('rtf')
oWord = createobject('Word.Application')
with oWord
 .Visible = .t.
 .Documents.Open(m.lcDoc)
 .ActiveDocument.Content.Select
 .Selection.Collapse(wdCollapseEnd)
 .Selection.InsertFile(m.lcRTF, , .f.)
 .Activate
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
Next
Reply
Map
View

Click here to load this message in the networking platform