If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Not Running Smoothly
I'm using MS Word to automate creating a PowerPoint presentation from a Web
link which does so quite neatly. When the user clicks on the Web link, I instantiate Word by using a new ActiveX object (Word.Application) to open a read-only version of a Word document. Once the document opens, the Document_Open() procedure fires automatically and runs the code to create the presentation. The whole purpose of this is our company wants to remove all source *.ppt files from the server for security reasons and to save space. Thus, we had to come up with a way to reconstruct presentations exported for viewing on our Intranet (using a tool I developed) in .png format. Since PowerPoint doesn't allow us to do this from the Web, we run Word in the background to do the work which maybe causing some resource issues. Before running the process, I prompt the user with a MsgBox asking them if they want to continue. If they choose not to continue, we kill the whole process by closing the document and releasing all resources. As the process is running, Word is quietly running (creating the presentation) in the background (visible="false"). Once the presentation is created, we close Word and release resources used. The only problem I'm am having is whenever the user clicks OK to start the process, I have to momentarily make the PowerPoint window visible when the presentation is initially created. Since PowerPoint doesn't support using Application.Visible="msoFalse", I have to immediately minimize the application window so it's not visible to the user during the presentation build. However, when I do this, it leaves an imprint of the PowerPoint window in the background which I can't seem to get rid of until I prompt the user to save the newly created presentation to a location of their choice. I really don't want the user to see anything, after they click OK to start the process, until they are prompted to save the presentation. Is there a way to clear this so users don't see this because it looks kind of messy??? Also, while the presentation is being built, the user can't click anything to remove/minimize the window since this process making CPU work pretty hard. Any recommendations on making this run smoother would be great. This is a really scaled down version. Tony B. |
#2
|
|||
|
|||
Not Running Smoothly
Tony,
See if the hints in this PowerPoint FAQ entry help any: Hide PowerPoint while I automate it http://www.rdpslides.com/pptfaq/FAQ00307.htm -- Kathryn Jacobs, Microsoft MVP PowerPoint and OneNote Get PowerPoint answers at http://www.powerpointanswers.com Cook anything outdoors with http://www.outdoorcook.com Get OneNote answers at http://www.onenoteanswers.com If this helped you, please take the time to rate the value of this post: http://rate.affero.net/jacobskl/ I believe life is meant to be lived. But: if we live without making a difference, it makes no difference that we lived "Tony B." wrote in message ... I'm using MS Word to automate creating a PowerPoint presentation from a Web link which does so quite neatly. When the user clicks on the Web link, I instantiate Word by using a new ActiveX object (Word.Application) to open a read-only version of a Word document. Once the document opens, the Document_Open() procedure fires automatically and runs the code to create the presentation. The whole purpose of this is our company wants to remove all source *.ppt files from the server for security reasons and to save space. Thus, we had to come up with a way to reconstruct presentations exported for viewing on our Intranet (using a tool I developed) in .png format. Since PowerPoint doesn't allow us to do this from the Web, we run Word in the background to do the work which maybe causing some resource issues. Before running the process, I prompt the user with a MsgBox asking them if they want to continue. If they choose not to continue, we kill the whole process by closing the document and releasing all resources. As the process is running, Word is quietly running (creating the presentation) in the background (visible="false"). Once the presentation is created, we close Word and release resources used. The only problem I'm am having is whenever the user clicks OK to start the process, I have to momentarily make the PowerPoint window visible when the presentation is initially created. Since PowerPoint doesn't support using Application.Visible="msoFalse", I have to immediately minimize the application window so it's not visible to the user during the presentation build. However, when I do this, it leaves an imprint of the PowerPoint window in the background which I can't seem to get rid of until I prompt the user to save the newly created presentation to a location of their choice. I really don't want the user to see anything, after they click OK to start the process, until they are prompted to save the presentation. Is there a way to clear this so users don't see this because it looks kind of messy??? Also, while the presentation is being built, the user can't click anything to remove/minimize the window since this process making CPU work pretty hard. Any recommendations on making this run smoother would be great. This is a really scaled down version. Tony B. |
#3
|
|||
|
|||
Not Running Smoothly
One possibility that comes to mind: After invoking PPT and minimizing it, insert DoEvents in whatever code is controlling everything at that point (script in browser or Word) It might also help if you force something else to happen on screen; perhaps bring up a new "Please wait while we generate your presentation" screen. In article , Tony B. wrote: I'm using MS Word to automate creating a PowerPoint presentation from a Web link which does so quite neatly. When the user clicks on the Web link, I instantiate Word by using a new ActiveX object (Word.Application) to open a read-only version of a Word document. Once the document opens, the Document_Open() procedure fires automatically and runs the code to create the presentation. The whole purpose of this is our company wants to remove all source *.ppt files from the server for security reasons and to save space. Thus, we had to come up with a way to reconstruct presentations exported for viewing on our Intranet (using a tool I developed) in .png format. Since PowerPoint doesn't allow us to do this from the Web, we run Word in the background to do the work which maybe causing some resource issues. Before running the process, I prompt the user with a MsgBox asking them if they want to continue. If they choose not to continue, we kill the whole process by closing the document and releasing all resources. As the process is running, Word is quietly running (creating the presentation) in the background (visible="false"). Once the presentation is created, we close Word and release resources used. The only problem I'm am having is whenever the user clicks OK to start the process, I have to momentarily make the PowerPoint window visible when the presentation is initially created. Since PowerPoint doesn't support using Application.Visible="msoFalse", I have to immediately minimize the application window so it's not visible to the user during the presentation build. However, when I do this, it leaves an imprint of the PowerPoint window in the background which I can't seem to get rid of until I prompt the user to save the newly created presentation to a location of their choice. I really don't want the user to see anything, after they click OK to start the process, until they are prompted to save the presentation. Is there a way to clear this so users don't see this because it looks kind of messy??? Also, while the presentation is being built, the user can't click anything to remove/minimize the window since this process making CPU work pretty hard. Any recommendations on making this run smoother would be great. This is a really scaled down version. Tony B. -- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com |
#4
|
|||
|
|||
Not Running Smoothly
Thanks for all your help. Instead of opening the PowerPoint application, I
following the suggestion in the FAQ you quoted and just opened a dummy presentation containing the code (without a window). I could then use Word, long enough to run the code, and pop up the save as window when ready. Thanks again. Tony B. "Tony B." wrote in message ... I'm using MS Word to automate creating a PowerPoint presentation from a Web link which does so quite neatly. When the user clicks on the Web link, I instantiate Word by using a new ActiveX object (Word.Application) to open a read-only version of a Word document. Once the document opens, the Document_Open() procedure fires automatically and runs the code to create the presentation. The whole purpose of this is our company wants to remove all source *.ppt files from the server for security reasons and to save space. Thus, we had to come up with a way to reconstruct presentations exported for viewing on our Intranet (using a tool I developed) in .png format. Since PowerPoint doesn't allow us to do this from the Web, we run Word in the background to do the work which maybe causing some resource issues. Before running the process, I prompt the user with a MsgBox asking them if they want to continue. If they choose not to continue, we kill the whole process by closing the document and releasing all resources. As the process is running, Word is quietly running (creating the presentation) in the background (visible="false"). Once the presentation is created, we close Word and release resources used. The only problem I'm am having is whenever the user clicks OK to start the process, I have to momentarily make the PowerPoint window visible when the presentation is initially created. Since PowerPoint doesn't support using Application.Visible="msoFalse", I have to immediately minimize the application window so it's not visible to the user during the presentation build. However, when I do this, it leaves an imprint of the PowerPoint window in the background which I can't seem to get rid of until I prompt the user to save the newly created presentation to a location of their choice. I really don't want the user to see anything, after they click OK to start the process, until they are prompted to save the presentation. Is there a way to clear this so users don't see this because it looks kind of messy??? Also, while the presentation is being built, the user can't click anything to remove/minimize the window since this process making CPU work pretty hard. Any recommendations on making this run smoother would be great. This is a really scaled down version. Tony B. |
Thread Tools | |
Display Modes | |
|
|