Go Back   Trackpads Community > General Discussions > Computer and Technology > Microsoft Applications

Microsoft Applications Discussions about Windows and other MS Products such as Office

Reply
 
LinkBack Thread Tools
Old 11-11-2004, 22:55   #1 (permalink)
=?Utf-8?B?bXN0dWVobGVy?=
Civilians

 
Default Re: COM automation of bulk table creation and table cell backgroun

Erwin, Shyam,

I'm doing a similar operation on a project I'm working on - it works OK, but
the performance is terrible. Can you explain a little more about "preventing
the window from redraw or perform the automation while PPT is not visible"?

I've tried using Automation without making the Powerpoint application
visible, but when I do so, I get an error. In other words, this code:

Dim oApp
Set oApp = CreateObject("Powerpoint.Application")
Dim oPres
Set oPres = oApp.Presentations.Open("C:\Presentation.ppt")

Creates this error:

"Presentations.Open : Invalid request. The PowerPoint Frame window does not
exist"

Any advice or insight would be greatly appreciated.

Cheers,
Matt Stuehler



"Shyam Pillai" wrote:

> Erwin,
> Look at some of the example of table manipulation on this page.
> http://skp.mvps.org/ppttable.htm
> http://skp.mvps.org/ppttable2.htm
>
> There is no native approach to perform operation 1 apart from individually
> populating the cells. You will get performance improvement if you prevent
> the window from redraw or perform the automation while PPT is not visible.
>
> --
> Regards
> Shyam Pillai
>
> Animation Carbon - http://skp.mvps.org/ac/index.html
>
> "Erwin S. Andreasen" <erwin.andreasen@gmail.com> wrote in message
> news:560b7cf7.0411061426.529ede97@posting.google.c om...
> >I am using the PowerPoint COM interface (specifically from Python, but
> > the method/property names are the same were I to use VB) to create a
> > presentation which contain tables. I have two issues:
> >
> > 1) since I have a lot of data to copy over, I would like to copy it to
> > the clipboard and then copy it to the already properly resized tables,
> > rather than set each cell individually (I use such a bulk copy method
> > to set up OLE charts within the presentation already)
> >
> > 2) I would like to change the background color of the cells
> >
> > However, I can find no sign of the above being possible when looking
> > at the Office 2003 PPT docs. I have tried recording a macro and
> > performing those actions -- nothing is recorded when they are
> > performed.
> >
> > Any suggestions? My fallback, if the COM interface for at least #2 is
> > unavailable (#1 just means worse performance) is to use something like
> > "Watsup" to programmatically send key strokes/mouse clicks to
> > Powerpoint, but that seems rather inelegant.
> >
> > http://www.tizmoi.net/watsup/intro.html

>
>
>

 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Trackpads Information
Click to Visit
Old 11-11-2004, 22:55   #2 (permalink)
=?Utf-8?B?bXN0dWVobGVy?=
Civilians

 
Default Re: COM automation of bulk table creation and table cell backgroun

Shyam,

That "Lock screen" is a VERY useful bit of code! Many thanks for sharing it!

Cheers,
Matt


"Shyam Pillai" wrote:

> a) You can lock you screen from redrawing - http://skp.mvps.org/ppt00033.htm
> b) Automate PPT in invisible mode:
> Dim oApp
> Dim oPres
> Set oApp = CreateObject("Powerpoint.Application")
> Set oPres = oApp.Presentations.Open("C:\Presentation.ppt", , , False)
>
>
> --
> Regards
> Shyam Pillai
>
> Handout Wizard: http://skp.mvps.org/how/
>
>
> "mstuehler" <mstuehler@discussions.microsoft.com> wrote in message
> news:8F96103D-A558-49BC-AA67-4C821A3A5659@microsoft.com...
> > Erwin, Shyam,
> >
> > I'm doing a similar operation on a project I'm working on - it works OK,
> > but
> > the performance is terrible. Can you explain a little more about
> > "preventing
> > the window from redraw or perform the automation while PPT is not
> > visible"?
> >
> > I've tried using Automation without making the Powerpoint application
> > visible, but when I do so, I get an error. In other words, this code:
> >
> > Dim oApp
> > Set oApp = CreateObject("Powerpoint.Application")
> > Dim oPres
> > Set oPres = oApp.Presentations.Open("C:\Presentation.ppt")
> >
> > Creates this error:
> >
> > "Presentations.Open : Invalid request. The PowerPoint Frame window does
> > not
> > exist"
> >
> > Any advice or insight would be greatly appreciated.
> >
> > Cheers,
> > Matt Stuehler
> >
> >
> >
> > "Shyam Pillai" wrote:
> >
> >> Erwin,
> >> Look at some of the example of table manipulation on this page.
> >> http://skp.mvps.org/ppttable.htm
> >> http://skp.mvps.org/ppttable2.htm
> >>
> >> There is no native approach to perform operation 1 apart from
> >> individually
> >> populating the cells. You will get performance improvement if you prevent
> >> the window from redraw or perform the automation while PPT is not
> >> visible.
> >>
> >> --
> >> Regards
> >> Shyam Pillai
> >>
> >> Animation Carbon - http://skp.mvps.org/ac/index.html
> >>
> >> "Erwin S. Andreasen" <erwin.andreasen@gmail.com> wrote in message
> >> news:560b7cf7.0411061426.529ede97@posting.google.c om...
> >> >I am using the PowerPoint COM interface (specifically from Python, but
> >> > the method/property names are the same were I to use VB) to create a
> >> > presentation which contain tables. I have two issues:
> >> >
> >> > 1) since I have a lot of data to copy over, I would like to copy it to
> >> > the clipboard and then copy it to the already properly resized tables,
> >> > rather than set each cell individually (I use such a bulk copy method
> >> > to set up OLE charts within the presentation already)
> >> >
> >> > 2) I would like to change the background color of the cells
> >> >
> >> > However, I can find no sign of the above being possible when looking
> >> > at the Office 2003 PPT docs. I have tried recording a macro and
> >> > performing those actions -- nothing is recorded when they are
> >> > performed.
> >> >
> >> > Any suggestions? My fallback, if the COM interface for at least #2 is
> >> > unavailable (#1 just means worse performance) is to use something like
> >> > "Watsup" to programmatically send key strokes/mouse clicks to
> >> > Powerpoint, but that seems rather inelegant.
> >> >
> >> > http://www.tizmoi.net/watsup/intro.html
> >>
> >>
> >>

>
>
>

 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2004, 22:55   #3 (permalink)
Shyam Pillai
Civilians

 
Default Re: COM automation of bulk table creation and table cell backgroun

a) You can lock you screen from redrawing - http://skp.mvps.org/ppt00033.htm
b) Automate PPT in invisible mode:
Dim oApp
Dim oPres
Set oApp = CreateObject("Powerpoint.Application")
Set oPres = oApp.Presentations.Open("C:\Presentation.ppt", , , False)


--
Regards
Shyam Pillai

Handout Wizard: http://skp.mvps.org/how/


"mstuehler" <mstuehler@discussions.microsoft.com> wrote in message
news:8F96103D-A558-49BC-AA67-4C821A3A5659@microsoft.com...
> Erwin, Shyam,
>
> I'm doing a similar operation on a project I'm working on - it works OK,
> but
> the performance is terrible. Can you explain a little more about
> "preventing
> the window from redraw or perform the automation while PPT is not
> visible"?
>
> I've tried using Automation without making the Powerpoint application
> visible, but when I do so, I get an error. In other words, this code:
>
> Dim oApp
> Set oApp = CreateObject("Powerpoint.Application")
> Dim oPres
> Set oPres = oApp.Presentations.Open("C:\Presentation.ppt")
>
> Creates this error:
>
> "Presentations.Open : Invalid request. The PowerPoint Frame window does
> not
> exist"
>
> Any advice or insight would be greatly appreciated.
>
> Cheers,
> Matt Stuehler
>
>
>
> "Shyam Pillai" wrote:
>
>> Erwin,
>> Look at some of the example of table manipulation on this page.
>> http://skp.mvps.org/ppttable.htm
>> http://skp.mvps.org/ppttable2.htm
>>
>> There is no native approach to perform operation 1 apart from
>> individually
>> populating the cells. You will get performance improvement if you prevent
>> the window from redraw or perform the automation while PPT is not
>> visible.
>>
>> --
>> Regards
>> Shyam Pillai
>>
>> Animation Carbon - http://skp.mvps.org/ac/index.html
>>
>> "Erwin S. Andreasen" <erwin.andreasen@gmail.com> wrote in message
>> news:560b7cf7.0411061426.529ede97@posting.google.c om...
>> >I am using the PowerPoint COM interface (specifically from Python, but
>> > the method/property names are the same were I to use VB) to create a
>> > presentation which contain tables. I have two issues:
>> >
>> > 1) since I have a lot of data to copy over, I would like to copy it to
>> > the clipboard and then copy it to the already properly resized tables,
>> > rather than set each cell individually (I use such a bulk copy method
>> > to set up OLE charts within the presentation already)
>> >
>> > 2) I would like to change the background color of the cells
>> >
>> > However, I can find no sign of the above being possible when looking
>> > at the Office 2003 PPT docs. I have tried recording a macro and
>> > performing those actions -- nothing is recorded when they are
>> > performed.
>> >
>> > Any suggestions? My fallback, if the COM interface for at least #2 is
>> > unavailable (#1 just means worse performance) is to use something like
>> > "Watsup" to programmatically send key strokes/mouse clicks to
>> > Powerpoint, but that seems rather inelegant.
>> >
>> > http://www.tizmoi.net/watsup/intro.html

>>
>>
>>



 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2004, 22:55   #4 (permalink)
Shyam Pillai
Civilians

 
Default Re: COM automation of bulk table creation and table cell background changes

Erwin,
Look at some of the example of table manipulation on this page.
http://skp.mvps.org/ppttable.htm
http://skp.mvps.org/ppttable2.htm

There is no native approach to perform operation 1 apart from individually
populating the cells. You will get performance improvement if you prevent
the window from redraw or perform the automation while PPT is not visible.

--
Regards
Shyam Pillai

Animation Carbon - http://skp.mvps.org/ac/index.html

"Erwin S. Andreasen" <erwin.andreasen@gmail.com> wrote in message
news:560b7cf7.0411061426.529ede97@posting.google.c om...
>I am using the PowerPoint COM interface (specifically from Python, but
> the method/property names are the same were I to use VB) to create a
> presentation which contain tables. I have two issues:
>
> 1) since I have a lot of data to copy over, I would like to copy it to
> the clipboard and then copy it to the already properly resized tables,
> rather than set each cell individually (I use such a bulk copy method
> to set up OLE charts within the presentation already)
>
> 2) I would like to change the background color of the cells
>
> However, I can find no sign of the above being possible when looking
> at the Office 2003 PPT docs. I have tried recording a macro and
> performing those actions -- nothing is recorded when they are
> performed.
>
> Any suggestions? My fallback, if the COM interface for at least #2 is
> unavailable (#1 just means worse performance) is to use something like
> "Watsup" to programmatically send key strokes/mouse clicks to
> Powerpoint, but that seems rather inelegant.
>
> http://www.tizmoi.net/watsup/intro.html



 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2004, 22:55   #5 (permalink)
Erwin S. Andreasen
Civilians

 
Default COM automation of bulk table creation and table cell background changes

I am using the PowerPoint COM interface (specifically from Python, but
the method/property names are the same were I to use VB) to create a
presentation which contain tables. I have two issues:

1) since I have a lot of data to copy over, I would like to copy it to
the clipboard and then copy it to the already properly resized tables,
rather than set each cell individually (I use such a bulk copy method
to set up OLE charts within the presentation already)

2) I would like to change the background color of the cells

However, I can find no sign of the above being possible when looking
at the Office 2003 PPT docs. I have tried recording a macro and
performing those actions -- nothing is recorded when they are
performed.

Any suggestions? My fallback, if the COM interface for at least #2 is
unavailable (#1 just means worse performance) is to use something like
"Watsup" to programmatically send key strokes/mouse clicks to
Powerpoint, but that seems rather inelegant.

http://www.tizmoi.net/watsup/intro.html
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
FP 2003: Table & Cell Background problems... Yerdaddi Web Design 0 05-22-2005 20:00
Adding rows to a table via automation? Tim Witort Microsoft Applications 2 01-18-2005 03:00
link word table to excel table pobuckley Microsoft Applications 3 06-16-2004 02:27
Automate creation of a table of hyperlinks? Herb Microsoft Applications 6 06-16-2004 00:56
Table with colored background within "Frame" O Ransen Web Design 2 06-15-2004 11:12


Community Information
Options
Quick Options
Trackpads Non-Commercial Ad
Copyright Information Click to Visit
Time
Server Time
All times are GMT -4. The time now is 11:30.
Copyright
Copyright Information
The header is based off of work by Vipixel.com and modified by this site. Trackpads and the Trackpads Logo are both Registered Trademarks of Jason Edwards and cannot be used without prior written permission.  The only exception is as a link back to this site. Trackpads is a private website run by a small legion of volunteers, 3 dogs, 12.5 cats and an army of small, super smart, bio-engineered mice with pointy hats and tutu's. Search Engine Friendly URLs by vBSEO 3.2.0 RC7
Archive Links
Archive Links
Page generated in 0.97751 seconds with 19 queries