In the old days of Visual Basic for Applications, I successfully opened a
file (of any file type: .dwg .pdf .doc etc) in its own application using:
ActiveWorkbook. FollowHyperlink Address:=filepa th, NewWindow:=True
I don't want to read/write the file, nor to display FileDialog, I just want
to open a named file it in its own application (usually Adobe.pdf).
In Visual Studio 2005 I can successfully find the file using wildcards in:
My.Computer.Fil eSystem.GetFile s
but neither of the following will open the file or report an error:
System.IO.File. Open(filepath, IO.FileMode.Ope n)
Microsoft.Visua lBasic.FileOpen (1, filepath, OpenMode.Random )
Presumably, I am not using the appropriate Method. Probably the answer's
simple, can anyone help, please?
--
dave 3 3676
DF,
Open a file is in my idea a kind in my idea misplaced term still existing
from the tapereader. You want to read a file from disk I assume, but than
the application has to use it.
Mostly that what is readed using file access is a string. It can as well be
a part of a special application. But than has the application like Office as
you showed the code to do that.
Reading a file is mostly using the streamreader. http://windowssdk.msdn.microsoft.com...eamreader.aspx
I hope this helps something,
Cor
"df" <df@discussions .microsoft.coms chreef in bericht
news:ED******** *************** ***********@mic rosoft.com...
In the old days of Visual Basic for Applications, I successfully opened a
file (of any file type: .dwg .pdf .doc etc) in its own application using:
ActiveWorkbook. FollowHyperlink Address:=filepa th, NewWindow:=True
I don't want to read/write the file, nor to display FileDialog, I just
want
to open a named file it in its own application (usually Adobe.pdf).
In Visual Studio 2005 I can successfully find the file using wildcards in:
My.Computer.Fil eSystem.GetFile s
but neither of the following will open the file or report an error:
System.IO.File. Open(filepath, IO.FileMode.Ope n)
Microsoft.Visua lBasic.FileOpen (1, filepath, OpenMode.Random )
Presumably, I am not using the appropriate Method. Probably the answer's
simple, can anyone help, please?
--
dave
Her you open as if you wanted to read/write the file content.
You have actually to "launch" the file i.e. the associated application will
launch and will open the file. See Process.Start.. .
--
Patrice
"df" <df@discussions .microsoft.coma écrit dans le message de news: ED************* *************** **...icrosof t.com...
In the old days of Visual Basic for Applications, I successfully opened a
file (of any file type: .dwg .pdf .doc etc) in its own application using:
ActiveWorkbook. FollowHyperlink Address:=filepa th, NewWindow:=True
I don't want to read/write the file, nor to display FileDialog, I just
want
to open a named file it in its own application (usually Adobe.pdf).
In Visual Studio 2005 I can successfully find the file using wildcards in:
My.Computer.Fil eSystem.GetFile s
but neither of the following will open the file or report an error:
System.IO.File. Open(filepath, IO.FileMode.Ope n)
Microsoft.Visua lBasic.FileOpen (1, filepath, OpenMode.Random )
Presumably, I am not using the appropriate Method. Probably the answer's
simple, can anyone help, please?
--
dave
Patrice
Splendid!
It works, many thanks - I would have spent days trying to find it.
--
dave
"Patrice" wrote:
Her you open as if you wanted to read/write the file content.
You have actually to "launch" the file i.e. the associated application will
launch and will open the file. See Process.Start.. .
--
Patrice
"df" <df@discussions .microsoft.coma écrit dans le message de news: ED************* *************** **...icrosof t.com...
In the old days of Visual Basic for Applications, I successfully opened a
file (of any file type: .dwg .pdf .doc etc) in its own application using:
ActiveWorkbook. FollowHyperlink Address:=filepa th, NewWindow:=True
I don't want to read/write the file, nor to display FileDialog, I just
want
to open a named file it in its own application (usually Adobe.pdf).
In Visual Studio 2005 I can successfully find the file using wildcards in:
My.Computer.Fil eSystem.GetFile s
but neither of the following will open the file or report an error:
System.IO.File. Open(filepath, IO.FileMode.Ope n)
Microsoft.Visua lBasic.FileOpen (1, filepath, OpenMode.Random )
Presumably, I am not using the appropriate Method. Probably the answer's
simple, can anyone help, please?
--
dave
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: jmd |
last post by:
Hello.
I have downloaded and installed Visual Studio 2005 February CTP -- Professional Edition (English) from msdn.
All works fine (with a few bugs) except the Quickstarts.
The Quickstarts install without problems.
I have 2 questions :
1. When I launch the Quickstarts, I only see :
--------------------------------------------------------------------------------
Microsoft .NET Framework SDK QuickStart Tutorials
|
by: Jim |
last post by:
I've got an asp.net site that is published to another computer with Windows
2000 and IIS on it using 'Publish/Remote Site'(http://name/BuySellTrade).
Publishing updates the folders in the directory but does not write files to
the location.
What needs to be done so that the asp.net files like the .aspx will be
written to the http directory?
|
by: Jim |
last post by:
I've got a simple asp.net application that is published to a server using
2000 and IIS. No files are copied to the server.
What needs to be done to copy the files?
|
by: Jerad Rose |
last post by:
I recently installed Visual Studio 2003, after having already installed VS
2005. Unfortunately, it took over all of the file associations. There is
an option in Visual Studio 2005 to restore these associations, under Tools >
Options Environment General. However, this button doesn't seem to do
anything. Specifically, my SLN files were associated to VS 2003, and when I
clicked this, this association didn't change. I even tried deleting...
|
by: Nathan Sokalski |
last post by:
Visual Studio 2005 recently stopped generating the *.designer.vb files for
my *.aspx and *.ascx files. I am using Service Pack 1, and do not believe I
did anything differently than normal prior to this happening. Is there
anything that could have caused this? Does anyone know of a way to fix it?
Thanks.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
| |
by: Nathan Sokalski |
last post by:
Visual Studio 2005 unexpectedly stopped generating the *.designer.vb files
for *.aspx and *.ascx files. After a few days of frustration trying to fix
this, I noticed that it had the following Warning in the Error List tab at
the bottom of the screen:
Generation of designer file failed: The relative virtual path '?/' is not
allowed here. C:\Inetpub\wwwroot\CAT_aspnet\worldnews.aspx 0 0 CAT_aspnet
|
by: fischermx |
last post by:
Environment:
Microsoft Visual Studio 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727
Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1
(KB926601)
Hotfix for Microsoft Visual Studio 2005 Professional Edition - ENU
(KB933608)
Windows XP, SP2.
|
by: marathoner |
last post by:
I am currently migrating my Visual C++ 6.0 applications to Visual Studio
2005. I am getting compiler errors involving the VS2005's platform SDK.
When I removed directory references to that SDK, and started using the
Microsoft Platform SDK for XP SP2, the errors disappeared, but I am now
getting numerous warnings (macro redefinitions) as follows:
StdAfx.cpp
WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
C:\Program...
|
by: raylopez99 |
last post by:
Will ASP.NET 3.0 work under Visual Studio 2005? And what is a good
newbie ASP.NET book?
Subject: Will ASP.NET 3.0 work under Visual Studio 2005? And what is a
good newbie ASP.NET book?
My question is in the title. I have experience with C#, SQL, C++/CLI
and have done exercises in a book on database design, so I'm not a
total beginner, but a recommendation for an intermediate book on
ASP.NET is appreciated.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |