Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to order non VFP files?
Message
From
07/01/2006 09:37:57
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/01/2006 20:05:49
Hong Yew
People Quest
Malaysia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01084326
Message ID:
01084392
Views:
9
>Hi all
>
>I would appreciate if you could advise how can I open the following files from within my VFP9 application :
>
>1. Excel file
>2. HTML file
>3. Word document file
>
>Thanks
>
>Best Regards

Depends on what you want to do with them. ShellExecute() or automation. ie:
local oWord
oWord = createobject("Word.Application")
oWord.Documents.Open( GetFile('DOC') )
oWord.Visible = .t.
oWord.Activate
local oExcel
oExcel = createobject("Excel.Application")
oExcel.WorkBooks.Open( GetFile('XLS') )
oExcel.Visible = .t.
Public oForm
lcFile = GetFile('HTM') && might be another file like XLS,DOC
oForm = NewObject('HTMLViewerForm')
oForm.Show
oForm.htmlviewer.navigate2(m.lcFile)

Define Class HTMLViewerForm As Form
  Height = 500
  Width = 800
  Add Object htmlviewer As OleControl With ;
    Height = 500, Width = 800, Visible = .T., ;
    OleClass = 'Shell.Explorer'

  Procedure htmlviewer.Refresh
    Nodefault
  Endproc
Enddefine
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