Openning A File With Default Program
I want to make a media player program with Windows Media Player ActiveX Component but if i double click on a media file it will be opened with windows media player. How can i do that with my application?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Openning A File Using Associated Program
I have a directory of word, excel, access etc. files. i have a dirList and fileList from which i get the file path and name (fPathName).
in normal windows each file has an associated program
eg .doc when double clicked opens word
i want to do the same but select my file through my fileList say a.msg click a button and it open as it would if you did it through windows explorer.
I think that makes sense, how can i do this
cheers theNoot
Openning Users Default Internet Dialer?
I did a search here and could not find the answer.
I already know how to detect if a user is connected - now I need to take that a step further and if they are not - open their default dialer on their machine.
Thoughts?
Openning A Program
Microsoft word appliction, music, any file has an "open" command for it when you write click- the file
Is there any way I can open a program from VB??
Openning My Program Upon Closeing Another Program
Im fairly new to VB, but not stupid on it niether lol. Heres my problem, I have made an application that runs in the background on windows what i want it to do is run a backup program for my invoiceing utility upon shutdown of the invoiceing program. is there a way I can make my program watch for the exit o Invomax.exe Any posts will be helpfull. Just to let you know what programs im useing, Invomax shop utilitys, and invoback which is the back up utility for invomax. Thank you.
Opening File In Default Program
Say if I have an .mp3 file and the default program to open it is winamp, how do I open it in winamp. I want the default program to open it.
Open File With Default Program
Does anyone know how to open a file with its default program handler, ie a pdf would be acrobat, a .doc would be word or open office, etc etc.
Load A File With Non-default App In A Vb Program
The command loads a .jpg file for editing. By default in windowsXP, it loads a .jpg file with Fax & Picture viewer:
Code:dim program as string
dim filepath as string
program = "C:program filesadobephotoshopphotoshop.exe"
.
.
.
shell(Program & " " & filepath)
For html and image files, before I add the filepath to the shell function, the spaces in the file path must be replaced with a
"%20". For txt files i must use back the spaces.
But so far this method works only with .txt files, html files and image files. Files like office documents and vb project files, it doesn't work at all Why?
Is there another way to load a file in VB with a designated non-default app? Is it possible with the win API method shellExecute()? Please advise. Thanks in advance.
Open File With Default Program Association
Hi All,
Does anybody know how to open a file with whatever program Windows has associated with the file? For example let's say I want to open a .xls file but one computer might use Excel and another computer might use OpenOffice. Is there a way to open the file from a VB app similar to double clicking on the file from Windows Explorer?
Thanks for your help.
Kevin
Passing File To System Default Program...
Hello All,
When one is in Windows Explorer and one double-clicks a file, the file is automatically passed to the default program set up in Tools>>Folder Options. This is done by handle. ie - .xls is passed to Excel.
Is there a call to leverage that within VB6??
Thanx In Advance,
->Noah
Opening Csv File To View Using Default Program
I want to open a .csv file using what ever the default program currently is for opening up a csv file. I know you can use the SHELL command and specifiy the program (ie. Shell "notepad" ""C:output.csv""") and you can also create an instance to MS Excel to open a csv file. How can I just open it to view using what ever the default program is??
File Openning
I am trying to open multiple .txt file. Is it possible to open every File in a specified Directory. If yes how ?
Thanks in advance
Chris
Openning A File?
How can I open a file ( i.e. picture, video, music, text...) with it's common program? For example my program will open a picture file with common windows's program.
Openning A File
Hi
I am writing an application which will enable the user to select a file and open the file with it's associated application. For example if a user double clicks on a “.txt” file in explorer the file extension is automatically associated with notepad and the file is opened in notepad. How do you implement this automatic association between a file extension and an application and how to you get the associated application to open the file.
Regards Diana
Help Openning Excel File
Hello guys, this is very urgent, so any help would be great
I made a program that opens Excel file and then does some calculations with data. The computer I wrote it on has excel 2003! and it works fine. Whenever I try running the program on a different computer that has excel 2000 it gives me error on
VB Code:
Dim inputFile As Excel.Workbook.... Set inputFile = exlApp.Workbooks.Open(myPath)...
even thought it goes through
Set exlApp = New Excel.Application
HELP !?
Problem - Openning PDF File.
I am trying to open a existing PDF file using visual basic code(out side of the form). But i didnt got the exact way to open that. Plz help with examble code.
My advance Thanks for that guy.
Openning A Protected PDF File From VB
Hi, I protected a PDF File with "Document Open Password" and I would like to know how to open this kind of protected document from VB. I have used this code to open non protected pdf files.
Dim App, Doc As Object
Set App = CreateObject("AcroExch.App")
Set Doc = CreateObject("AcroExch.AVDoc")
App.Show
Doc.Open "C:1.pdf", "1.pdf"
I have also used ShellExecute, but these dont work.
Thanks a lot
Openning Up Another Form Or Text File
I know this is an easy question but how do u open up another form or open a text file. See I decided to write the instructions for my program in a text file and I need a code to open that up I also need to know how to open up another form called form2 when someone clicks a certain command
Getting Vba File From A Closed And Non-openning Excel File.
My question is if it is possible to get vba file from a closed and non-openning excel file. Because I can not open the file and I get error closing all excel.exe. If I can get the vba file as excel file is closed my problem will be solved.
Thank you...
Openning CSV File Via Microsoft Text Driver
I use Microsoft Text Driver for open CSV file. But on one server it works with commas as delimiters and on second with semicolons. Is any way how to set type of delimiter before accessing CSV file?
K.
Error Message When Openning An XLS File With Pivot Tables
Hi,
I have a file which is mainly used in Excel 2002. Sometimes, when I try to open it, I get an error message that says "cannot read file".
Then it asks me if I want to repair the file. Then it says "Errors were detected in file 'XXXX.xls'
The following is a list of repairs:
PivotTable report 'PivotTable1' on '[XXXX.xls]
Sheet1' was discarded due to integrity problems."
and then the pivot table is only composed of values.
I heard something about downloading XP's Service Pack 3, but I would like to know if there any other suggestions.
Thanks ina advance
Edit by Moderator:
Please post Excel questions, in the Excel forum.
Thank you.
Default Program
hi
i like 2 make my program the default program 2 open .txt files.
i find code but it's not working on use formats.
if any one can help me please i will be realy grateful 2 him.
im useing VB6 program
Thank u all
imosha
Default Program
hi
i like 2 make my program the default program 2 open .txt files.
i find code but it's not working on use formats.
if any one can help me please i will be realy grateful 2 him.
Thank u all
imosha
Default Program
Quick Question:
I have my program already compiled and made and just about everything is ready. In my program, you use lists to do certain things. These lists can be constructed straight from the program, or can be loaded from a file. The file type is one I sort of 'made up' it ends in ".Aub". Obviously you can tell it's nothing that you would instantly reconize as a file type, and it has no icon.
Here is where I need help. I know programs can take a certain type of file by default. Take Visual Basic forms for example. When you double click on them, having VB installed, VB will instantly load them up for you.
This is what I want to do with my program. For my premade/saved ".Aub" lists, when they are loaded/double clicked, I want my program to be the default loader, and when it loads, load the list into the program and display it to them. This would require two things:
1. How do I make it the default
2. How do I know what list they loaded
Thanks in advanced,
*Inuyasha1782*
Default Font In Program
Isn't it possible to change the default font when you write textboxes etc in a program? I found the font for writing codes, but I havent found anything for the UI font.
I want my entire project UI in Comic Sans font, and I'm getting tired of changing font for every box...
I Want To Shellexecute To A Program Other Than The Default
Hello,
I'm trying to use the shellexecute function to Print a document in a program other than the one the file is defaulted to Print from. Sorry, that's confusing. I have a dwg file that would normally Print in Autocad but I want to Print it in RxHighlight. So can i either use the shellexecute function to call a program other than the default or can I change the default program on the fly. thank for the help!!
Default Email Program
I am writting and Email Client program and when finished I want it to be able to do a few things that I am not sure how to do yet.
1) When you click on .eml file on your pc I want my app to automatically open up and view that email instead of using Outlook. How do I change it so that my app is the default email client instead of outlook?
2) When you go into internet explorer Tools/Internet Options and then to programs, I want my email app to be added to the email list. I believe I would do this in the registry at HKey_Local_MachineSoftwareClientsMails. I would just add my program in the registry but what values do I give it in the registry? I see values like %1 and other funky stuff for Outlook but would mine be the same?
Default Email Program
I am writting an email program. When the program starts, I want to be able to determine if my program is the default email program and if it is not then I want to make it the default email program. Anyone know how I can do this?
Email Default Program
How can i Get my email default program in VB, between Microsoft Outlook and Outlook Express.
Thanks.
Default Email Program
I am writting and Email Client program and when finished I want it to be able to do a few things that I am not sure how to do yet.
1) When you click on .eml file on your pc I want my app to automatically open up and view that email instead of using Outlook. How do I change it so that my app is the default email client instead of outlook?
2) When you go into internet explorer Tools/Internet Options and then to programs, I want my email app to be added to the email list. I believe I would do this in the registry at HKey_Local_MachineSoftwareClientsMails. I would just add my program in the registry but what values do I give it in the registry? I see values like %1 and other funky stuff for Outlook but would mine be the same?
Default Mail Program
Is there a easy way for calling the default mail program on a users pc when trying to send an email from a vb application. I dont want to write my own mail program i just want to call the default mail program on my pc such as outlook or outlook express.
I anybody can help ??
Thanks
Open A .txt With Default Program
How can I open (shell to) a .txt file with the default program from VB?
Some people have Notepad, but I use TextPad as my default.txt program...
Thanks!
How Do I Open A .jpg With The Default Program.
I can go to start run and type in c:mypic.jpg and it opens with the default program.
I tried using shell (c:mypic.jpg) and I get an error.
How can I open a .jpg by only using the path to the file like I do when using start run.
Thanks
Brandon
Default Mail Program
I've written a E-Mail app in VB.
How do I set it as the default email Program?????
Program For Default Directory?
Okay guys, I have a partitioned HD, and EVERY, SINGLE, TIME, when I open something, It leaves my at my default VB directory, or default Windows directory. Is there a way to bind a program to a keycombination (Ex: Ctl+Alt+R will run my program) that will automatically change the current (I guess) CommonDialog to a different directory?
-Tyler
God Bless VB Programmers!
Start Default Mail Program
Hey,
I've been looking around, but no-one looks like they can tell me how to do this:
I want to start the default e-mail program (not opening a new mail). When the user clicks the button he must be directed to the default program.
Can anybody point me into the right direction? I already tried to use the Windows Registery, but that isn't the right thing to do for this program.
Greets.John
Opening Default Mail Program
I am trying to transfer flexgrid contents to the default e mail program in the computer. I use ShellExecute togetherwith a string starting with"mailto:". So the computer understands that a mail program should be opened, finds the default mail app from the registry, open it up and pass the mailto: string to the flieds (TO, CC, BCC , SUBJECT and BODY)
As far as I get,I found that some characters (spaces, ampersands, vbCrLf, vbTab) passed to the string mentioned needed to be replaced.
But I experience difficulties with the method as I always get an API return value 2 file not found
I will appreciate any help.
Thanks
Tuluhan
Here is the full code
Private Sub SendMail(ByVal strAddress As String, _
Optional ByVal strCC As String, _
Optional ByVal strBCC As String, _
Optional ByVal strSubject As String, _
Optional ByVal strBodyText As String)
Dim strTemp As String
Dim lngret As Long
If Trim(Len(strCC)) Then strTemp = "&CC=" & strCC
If Trim(Len(strBCC)) Then strTemp = strTemp & "&BCC=" & strBCC
If Trim(Len(strSubject)) Then strTemp = strTemp & "&Subject=" & strSubject
If Trim$(Len(strBodyText)) Then ' If message body is not empty
' Replace special characters (ampersands, spaces, tabs and line feeds). I do not
' know how to replace tabs so I placed know how to replace tabs so I placed 8 spaces instead
strBodyText = Replace(strBodyText, vbTab, Space(8))
strBodyText = Replace(strBodyText, " ", "x20") ' Replace x with % here. (As this forum also use these characters beginning with % they don't appear)
strBodyText = Replace(strBodyText, "&", "x26") ' same as above
strBodyText = Replace(strBodyText, vbCrLf, "x0Dx0A") ' same as above
' Append it to our "mailto:" string
strTemp = strTemp & "&Body=" & strBodyText
End If
' If at least one of above is appended place ? character in front (necessary format for mailto string)
If Len(strTemp) Then Mid$(strTemp, 1, 1) = "?"
strTemp = "mailto:" & strAddress & strTemp ' Place our standard starting word "mailto:" and mail addres
lngret = ShellExecute(0, "open", strTemp, 0&, 0&, SW_SHOW) ' SW_SHOW is a contstant (5)
If lngret < 32 Then ' Successful.
Select Case lngret
Case 0
MsgBox "Out of memory/resources.", vbOKOnly, App.Title
Case 2
MsgBox "File not found.", vbOKOnly, App.Title
Case 3
MsgBox "Path not found.", vbOKOnly, App.Title
Case 17
MsgBox "Bad format.", vbOKOnly, App.Title
Case 31
MsgBox "No association exists.", vbOKOnly, App.Title
Case Else ' Other error has occured.
MsgBox "An error occurred. (Error Nr:" & lngret & ") during transfer to default e-mail application.", vbOKOnly, App.Title
End Select
End If
Unload Me
Exit Sub
End Sub
Get Path To The Default Mail Program
Hi,
Is it possible to get a path to the default mail program to shell it out and allow the user to check mail?
The 'default' mail program means it's selected as a default in Internet Options dialog on the Programs tab (you can display this dialog by going to Tools->Internet Options on Internet Explorer menu).
I couldn't find any default mail program setting under Internet Explorer settings when I browsed the registry.
For example if user has Microsoft Outlook and Outlook Express installed, and Outlook Express is selected as a default mail program, how do I find that out and then get path to Outlook Express? IE must know somehow which program to use.
Also, how do you need to register a mail program so that it would appear in E-Mail list in Internet Options?
Open Image In Default Program [VB6]
I am looking to be able to have an application open an image using the computers default viewing program.
My knowledge of VB is limited, and I tried using code that launched a .exe file but couldn't get that to work. This is the code I tried to use..
Code:
Dim procID As Integer
procID = Shell("pictures our0.jpg", vbNormalFocus)
I don't exactly understand what that code does, as it was never explained to me.
any help would be appreciated.
thanks,
Shawn
Using ShellExecute To Open In Non-Default Program
Hello,
I'm trying to use the shellexecute function to Print a document in a program other than the one the file is defaulted to Print from. Sorry, that's confusing. I have a dwg file that would normally Print in Autocad but I want to Print it in RxHighlight. So can i either use the shellexecute function to call a program other than the default or can I change the default program on the fly. thank for the help!!
How To Set The Default Element In A Folder By Program
How can I set in Outlook the default item in a folder using macro.
The DefaultMessageClass property of the Folder object is read only. In design mode works fine, but how can I do this programmatically?
Please help
regards,
fazek
Default Installed Mail Program.
I use this code to start the default installed mail program and it works perfect.
Code:
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
R = ShellExecute(Me.hWnd, "Open", "mailto:someone@someserver.xxx?subject=" & MessageSubject & "&Body=This is my message", vbnulstring, App.Path, vbNormalFocus)
Now I want to split my message (Body) in 2 lines like "&Body=This is line 1" & vbCRLF & "This is line2". No matter what I try, the text in the email shows up in one line.
Do you know why/how?
Jorgen
Detecting The Default Email Program
Hi. I couldn't decide where to put this post so I am putting it here. I need help urgently. My program has to detect what the default email program installed on a computer is. If possible, it should detect any other email program installed on the machine.
I need the code in VB.OLD. Thank you very much in advance.
How Can I Specify A Default Drive And Directory In ANOTHER Program ??
Hi
I have written a VB program that starts another application with the shell command,
and also sending keypresses to it by using SendKeys.
At a surtain point in the process of using SendKeys, I open a common dialog "Save as" in that program.
I am sending the filename to the Save as dialog with a SendKey, but I want to also set as default which drive and
directory this file is going to be stored in. Remember the user is not browsing, so I am looking for a way to specify exactly where the file is going to be stored on the computer through that other program (common dialog).
Is there anybody who can help me with a code example or a hint about how I can solve this problem please ?
Add Program Shortcut To Default Web Browser
hi,
here i have some problem. I really wish to know how i can write an extra shortcut of my program to the default web browser toolbar for quick access to my program. you know, for example yahoo! messenger, usually, after you finish install the program, the installer will also automatically write an extra shortcut like a button to the toolbar.
so, in this case, can anybody give me some idea of how to do something like this. thank you.
|