Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP apps. To Web apps
Message
 
To
08/06/1999 15:44:04
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00227646
Message ID:
00227652
Views:
27
Hi Mark,

Recently came across a article on Automate powerpoint form VFP.
SOURCE: http://www.microsoft.com/vfoxpro


TRY out.

Hope it solves ur querry.
Regards,
Aashish



Here is the article,

HOWTO: Automate PowerPoint Using Visual FoxPro
The information in this article applies to:
Microsoft PowerPoint 97 For Windows
Microsoft Visual FoxPro for Windows, version 6.0
Microsoft Word 97 for Windows
Microsoft PowerPoint 2000


SUMMARY
This article demonstrates how to automate Microsoft PowerPoint using Visual FoxPro 6.0.



MORE INFORMATION
By using automation in PowerPoint, you can programmatically print, display slides, and do most of the things you can do interactively. Follow these steps to build and run a Visual FoxPro automation example:

1. Start Visual FoxPro 6.0 and choose New... from the File menu.

2. Select Project as the file type, click New file, and name the project

PptTest.


3. In the Project Manager for your project, click on Programs under the Code
entry in the tree, then click the New... button.


4. Paste the following code into the Program1 window:

* Start PowerPoint
PptApp = CreateObject("Powerpoint.Application")

* Add a presentation
PptPres = PptApp.Presentations.Add(1)

* Add a slide
PptSlide1 = PptPres.Slides.Add(1,2)

* Add some text...
PptSlide1.Shapes(1).TextFrame.TextRange.Text = "My first slide"
PptSlide1.Shapes(2).TextFrame.TextRange.Text = "Automating Powerpoint is easy" + Chr(13) + "Using FoxPro is fun!"

* Add another slide, with a chart
PptSlide2 = PptPres.Slides.Add(2,5)

* Add some text
PptSlide2.Shapes(1).TextFrame.TextRange.Text = "Slide 2's topic"
PptSlide2.Shapes(1).TextFrame.TextRange.Text = "You can create and use charts in your Powerpoint slides!"

* Add a chart where the old one is...
With PptSlide2.Shapes(3)
cTop = .Top
cWidth = .Width
cHeight = .Height
cLeft = .Left
.Delete
EndWith

PptSlide2.Shapes.AddOLEObject(cLeft, cTop, cWidth, cHeight, "MSGraph.Chart")

* Add another slide, with an Organization chart
PptSlide3 = PptPres.Slides.Add(3,7)

* Add some text
PptSlide3.Shapes(1).TextFrame.TextRange.Text = "The rest is only limited by your Imagination"

* Add an Org chart where old one is...
With PptSlide3.Shapes(2)
cTop = .Top
cWidth = .Width
cHeight = .Height
cLeft = .Left
.Delete
EndWith

PptSlide3.Shapes.AddOLEObject(cLeft, cTop, cWidth, cHeight, "OrgPlusWOPX.4")

* Setup slide show properties...
With PptPres.Slides.Range.SlideShowTransition
.EntryEffect = 513
.AdvanceOnTime = 1
.AdvanceTime = 5
EndWith

* Prepare and run slide-show!
With PptPres.SlideShowSettings
.ShowType = 3
.LoopUntilStopped = 1
.RangeType = 1
.AdvanceMode = 2
.Run
EndWith

* Sleep so user can watch the show...
Wait window "Waiting for slide show to finish..." TIMEOUT 16

* Stop the slide show
PptPres.SlideShowWindow.View.Exit

* Clean up
PptApp.Quit
Release PptSlide3
Release PptSlide2
Release PptSlide1
Release PptPres
Release PptApp


5. Choose File/Save (CTRL+S) and save the program as PptTest.
6. Run the program (CTRL+E).


The example creates an example Powerpoint presentation, plays a slide show for
16 seconds, then cleans up. The code is commented carefully to explain what
each code segment does.


(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by Joe Crump, Microsoft Corporation

Additional query words:


Keywords : kbAutomation kbVFp kbVFp600 kbPowerPt kbGrpDSO
Version : WINDOWS:2000,6.0,97
Platform : WINDOWS
Issue type : kbhowto



Last Reviewed: May 24, 1999
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.




Article ID: Q230154

Last Reviewed:
May 24, 1999

Provided by Support Online from Microsoft Product Support Services.




--------------------------------------------------------------------------------

Did the information in this article help answer your question?
Yes
No
Did not apply

Please provide additional comments about this information. If you require a response or technical support, please click Contact Us.
(255 character max)









>I have an apps. for a lawer firm. This apps. gives them a chance to create all the documents for Real Estate Closings. Using that program users can create database of their files and print closing documents. The documents are PowerPoint presentations. Now they want to use apps. over the Internet for another firms. Also they want to preview docs. and change something on the fly (not thru VFP interface. Like ad-hoc change). So what would be a solution for that? What software (including server) will I need? I have a small network at home with cable connection to the internet. How would I create Web environment to develop and test program?
>Thanks Mark
--
--
Aashish Sharma
Tele Nos: +1-201-490-5405
Mobile: +91-9821053938
E-Mail:
aashish@aashishsharma.com
write2aashish@gmail.com

You better believe in yourself... if you don't, who else will ?
TODAY is a gift, that's why it's called PRESENT
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform