473,396 Members | 1,590 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,396 software developers and data experts.

Opening a WinWord or Powerpoint Doc

Dear colleagues

Is there a better command in VB.NET then ShellExecute to open from the
VB.NET code directly a Word or Powepoint document? The function should
automatically open depending of the file extension the appropriate program.
e.g. *.doc should be opened with Word etc.

Thank Alex
Nov 21 '05 #1
2 1403
Alex,

The commands for that can be by instance the ones beneath, however more
with the process or processstartInfo class

I hope this helps?

Cor

\\\
Dim p As New Process
p.StartInfo.UseShellExecute = True
p.StartInfo.FileName = "c:\mydoc.doc"
p.Start()
\\\
\\\
Dim p As New System.Diagnostics.ProcessStartInfo()
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\mydoc.doc"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
///
Nov 21 '05 #2
Thanks. It's working.
Alex

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:OB**************@TK2MSFTNGP09.phx.gbl...
Alex,

The commands for that can be by instance the ones beneath, however more
with the process or processstartInfo class

I hope this helps?

Cor

\\\
Dim p As New Process
p.StartInfo.UseShellExecute = True
p.StartInfo.FileName = "c:\mydoc.doc"
p.Start()
\\\
\\\
Dim p As New System.Diagnostics.ProcessStartInfo()
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\mydoc.doc"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
///

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Irishmaninusa | last post by:
I have two links on a page. One goes to an excel spreadsheet and the other goes to a powerpoint. If you click on the excel it prompts you to down load it or open it. IF you click on the...
2
by: Jim | last post by:
I'm trying to use Word to generate mailings for an Access project. I want to automate from the access side. I'm trying to open and print a file called mydocs I'm having trouble opening the...
3
by: Bhavya Shah | last post by:
Hello there, I am facing a strange problem. I use office converters for converting Microsoft Word documents to html in my application. I use office automation for the entire process. I open the...
2
by: Jonathan Trevor | last post by:
Hi, For the last couple of releases of a product we're developing we've been running to very wierd behavior from IE and our ASP.NET web application which serves up various types of files and I'm...
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 =...
0
by: ProfessorKaos | last post by:
I'm trying to open a slide show from an application but I am receiving an error when tring to reference the PowerPoint.Presentation object. I'm not sure if it a framework, registry, or version...
1
by: Thomas Beyerlein | last post by:
I am trying to open word with process.start but when it opens word it give me a error that says: Word experienced an error Try suggestions: * check the file permissions * Make sure there is...
4
by: daD | last post by:
I am using an access front-end to open a MS P{werpoint presentation. My problem is that when I am finished with the presentation and use the "back" button on the toolbar to return to MS Access, MS...
3
by: James | last post by:
Howdy. I'm having difficulty getting winword.exe processes to die on our development server when using SET objWord = CreateObject("word.application") from an .ASP page. This problem exists on...
8
by: gazza67 | last post by:
Hi, I want to do something that I thought would be simple but i cant seem to work it out, perhaps someone out there could help me. I want to browse for a file (it will be a word document),...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.