Small VB Question (1% brainpower required)
Hey everyone, I know you may think AO is turning into a VB help board, with all the VB stuff going on at the minute, but beleive me I have looked in numerous places for the answer to this simple question, but still could not find the answer... Please spare a moment of you precious time to read it...
Question:
I know that this code is able to open an .exe on your computer...
Shell "C:\whever the .exe file is"
I would like to know is there a string of code like this one where you can for instance open an html file of a word document on the computer?
Thanks to anyone whose thinking about helping ;)
-Prankster
Re: Small VB Question (1% brainpower required)
Quote:
Originally posted here by Prankster
I would like to know is there a string of code like this one where you can for instance open an html file of a word document on the computer?
What do you mean by this? If you want to open an html document in Word couldn't you just run Word with the shell command and add the html file name as a parameter?
Code:
Shell "c:\something\word.exe x:\some\where\doc2open.html"
Edit/Add: Checked that page p3pC suggested, you want to open a www-page with a piece of vb-code? Right now I'm on a comp which doesn't have VB installed so I can't try these but what if you separate "Public Const conSwNormal = 1" to two different lines, line break after the word 'Const'? I can't see that original layout matching any syntax I know but I might be wrong.
Edit/Add2: http://www.thebestweb.com/VBFAQS/faq_winAPI.asp has an example code for opening a www-page, too. Check if that works better than the first one.
Edit/Add3: Wheee, always new cool VB sites... :) Check this out: http://www.kather.net/VisualBasicSource/scindex.htm