-
October 1st, 2002, 10:07 AM
#1
MS Excel -> MS PowerPoint?
I've been trying to open a ppt file from Excel with little luck, too many error msgs! Is it possible or is it quicker and easier to go through MS Access.
I've been using code similar to:-
Dim channelNumber As Integer
channelNumber = Application.DDEInitiate("powerpnt", "H:\home\powerpoint\pptTest1.ppt")
But it produces a type mismatch error and then a run-time error - object-defined error
Cheers
Fossil
-
October 1st, 2002, 10:26 AM
#2
I don't mean to be rude here, but the concept of going through Access to get from Excel to Powerpoint strikes me as a stupendously bad idea.
Also, I do a lot of office automation and I've never heard of this DDEInitiate thing you're using, so I suspect it's an older form of office automation, or maybe it's something you have to use in VBA (I do most of my stuff from VB, not VBA).
I'd suggest that you use a VB app to go from Excel to Powerpoint rather than embedded VBA in Excel. Include the Excel and Powerpoint object libraries in a VB project and then use the object browser to find the methods you want. I believe you can then use the methods in VBA if you really need to stay in Excel.
phinds
vs2008, 3.5SP1 Version 9.0.21022.8 RTM
-
October 8th, 2002, 07:45 AM
#3
Hiya,
Thanks for your reply.
I agree it sounds mad but I haven't got access to VB itself at work and probably couldn't get it if I asked so I've only got access to VB through Excel, Access etc.
I found that using the DDE tools I could start up Powerpoint iteself but then not be able to use Sendkeys on it and couldn't open a specific file, or I could open a specific Access file - very annoying!
Any idea how to do it without a VB App?
Cheers
Fossil
-
October 8th, 2002, 04:07 PM
#4
office automation doesn't require VB. You should be able to open a PowerPoint file from Excel VBA with no problem. Go to the MS site for examples
Why do you want to use sendkeys? what are you trying to do in/with the PowerPoint file?
phinds
vs2008, 3.5SP1 Version 9.0.21022.8 RTM
-
October 9th, 2002, 09:09 AM
#5
Ok I'll go plough through the MS site then.
My boss has a spread sheet with loads of various company project's data on it and he wants to be able to click on a button next to a set of data and it produce a powerpoint slide/presentation with various stats in it in a presentable format in it. I've produced a sheet that looks the way he would like the powerpoint slide to look that's linked to all the appropriate data so it's basically a case of opening powerpoint and importing this one sheet into it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|