473,327 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

PowerPoint and python

Hi,

I'm developing a software in Python that communicates with Powerpoint files. My application has to open the Microsoft Powerpoint 2003 and a file .ppt format and show the presentation.
The problem is that i started to code the pyhton script, but when i execute it, it only opens the powerpoint 2003 (Microsoft) without open the presentation file (.ppt). ANybody knows if it has a bug at pywin ?

this is the code:

import win32com.client
ppt = win32com.client.Dispatch("Powerpoint.Application")
ppt.Visible=1
pr=ppt.Presentations.Open('C:\temp\porra.ppt')
Jan 24 '07 #1
1 8794
bartonc
6,596 Expert 4TB
Hi,

I'm developing a software in Python that communicates with Powerpoint files. My application has to open the Microsoft Powerpoint 2003 and a file .ppt format and show the presentation.
The problem is that i started to code the pyhton script, but when i execute it, it only opens the powerpoint 2003 (Microsoft) without open the presentation file (.ppt). ANybody knows if it has a bug at pywin ?

this is the code:

import win32com.client
ppt = win32com.client.Dispatch("Powerpoint.Application")
ppt.Visible=1
pr=ppt.Presentations.Open('C:\temp\porra.ppt')
Try
Expand|Select|Wrap|Line Numbers
  1. import win32com.client
  2. ppt = win32com.client.Dispatch("Powerpoint.Application")
  3. ppt.Visible=1
  4. pr=ppt.Presentations.Open(r'C:\temp\porra.ppt')
  5.  
which uses 'r'aw strings for windows path names. Otherwise python sees "\t" which is a tab character.
Jan 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Greg Wilson | last post by:
Hi. Has anyone ever written scripts to extract data from PowerPoint using Python? I know I could dredge through the VB examples in MSDN, and translate, but if someone's already done this, I'd be...
23
by: anton.vredegoor | last post by:
Here's my situation: I'm typing this in a public library on a computer with OS windows 2000 server. I can run Internet explorer, word, excel and powerpoint, that's it. Maybe java, but it seems...
0
by: Ata | last post by:
Hello, I am trying to copy the contents of the output of SQL Reporting Services to a PowerPoint slide. For this, I am using SQL Reporting Services to obtain an IMAGE stream, which I paste to the...
6
by: C Williams | last post by:
Hi, I am writing some VB.NET code that compiles to a dll. There is some code within it that manipulates Powerpoint 2003. The dll I am writing is for smart tags, and I am having trouble...
8
by: Rut | last post by:
Does anyone know how to start powerpoint from vb.net without the ppt screen appearing. I want to keep it hidden? Using this code: Try pp = New PowerPoint.Application pp.Visible =...
4
by: michael.pearmain | last post by:
Hi Experts, Looking for a very quick bit on of advice on how to make some python code run. I'm a newbie to both VBA and Python, so i apologise if this is very easy but i'm about to tear my hair...
6
by: Alan Isaac | last post by:
Can someone point me to a simple example or better yet tutorial for creating a Powerpoint using Python. Thanks, Alan Isaac
1
by: chrizstone | last post by:
Hi Guys, What i want to do is: I want to create a Slide programmatically where a Table is on it! Here´s my Code: String strTemplate; strTemplate = template; String...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.