Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Graphs in VFP
Message
From
19/04/2001 05:33:08
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
17/04/2001 18:10:46
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00496455
Message ID:
00497154
Views:
12
>How to Export the data from the General Field Back to normal file format???
>I create graph using do _gengraph with ... and now I want to save it
>as JPEG/GIG or BMP file. How do I do it???

Bali,
Well you can :)
thisform.myGraph.ChartArea.Copy()
#define wdFormatHTML 8
oWord = createobject('Word.Application')
with oWord
	.Documents.Add
  	.Application.Selection.Paste
  	lcPath = 'c:\temp\'
  	lcFileName = 'myExportedGraph'
  	.ActiveDocument.SaveAs(lcPath+lcFileName+'.htm', wdFormatHTML)
  	.Activedocument.Saved = .T.
  	.quit
endwith
adir(aGifFILE, lcPath+lcFileName+'_files\*.GIF')
wait window 'GIF file name is '+lcPath+lcFileName+'_files\'+aGifFILE[1,1]
Code is compatible with Office2000. If you'd use word97 then you can get wdFormatHTML value by iterating through FileFormats. I used word here but you could use another Office component like Excel :) Honestly though if I would do graph instead of gengraph I would create and export using Excel.
If you say no office component is available then do look George Tasker's obj2bmp in files section. It might be an easier solution for you.
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