Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ben,
The first thing you need to do is add references to word and powerpoint to your project. "Tools" - "References" and check off Microsoft Word X.X Object Library Microsoft PowerPoint X.X Object Library where X.X is your version of Word/Powerpoint Then to open a word document Dim wdApp As Word.Application Dim wdDoc As Word.Document Set wdApp = CreateObject("Word.Application") OpenWhat = Application.GetOpenFilename("Microsoft Word Documents (*.doc), *.doc") Set wdDoc = wdApp.Documents.Open(OpenWhat, , True) wdApp.Visible = True To open a powerpoint file Dim ppApp As PowerPoint.Application Dim ppPres As PowerPoint.Presentation Set ppApp = CreateObject("PowerPoint.Application") OpenWhat = Application.GetOpenFilename("Microsoft PowerPoint Presentation (*.ppt), *.ppt") Set ppPres = ppApp.Presentations.Open(OpenWhat, msoFalse, msoFalse, msoFalse) ppApp.Visible = msoCTrue Dan E "Ben E" wrote in message ... Hi all I am looking for a little help, what I would like to do is open files from within another application namely MS Word, i.e. when the user presses the button a Word document will be opened and activated, I also need for the file to open as read only. I also need to do the same for a PowerPoint file. Any help would be appreciated Cheers Ben |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
show most recent files first when opening excel files | Excel Discussion (Misc queries) | |||
Opening files | Excel Discussion (Misc queries) | |||
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 | Excel Discussion (Misc queries) | |||
How can I view files chronologically when opening multiple files | Excel Discussion (Misc queries) | |||
Opening CSV Files | Excel Programming |