Solved

How to: programmatically access/obtain the Hyperlink 'extrainfo' when hyperlinking a VB.exe

Posted on 2003-11-03
12
234 Views
Last Modified: 2008-03-06
Hello all,
I want to write a VB program which can be hyperlinked with parsed 'extra-info'.
How can I access this extra-info within my program ?
Example:
The hyperlink looks like:
file://C:\Temp\myProgram.exe?blablabla
how can I programmatically access the 'blablabla' string within my application ?
This seems generally the same task when speaking of commandline utility.
In this case I know the solution - it's just the 'command' function.
But how to solve it for dealing with hyperlink ?
Thanks in advance.
greet. catrice
0
Comment
Question by:catrice
12 Comments
 
LVL 9

Expert Comment

by:Dang123
ID: 9672801
0
 
LVL 5

Expert Comment

by:fantasy1001
ID: 9675947
I think you need something named "Command Line Argument"
VB come with a predefine varible Command that store the argument (for example blablabla).
The "?" is not needed"

Example:
create a new form
in the form load event, add this line
   me.caption = Command
then run your exe like this c:\temp\myprogram.exe blablabla, and you should notice that the caption of the window had changed to ....

~ fantasy `
0
 

Author Comment

by:catrice
ID: 9693118
Hi Dang123,
unfortunately I don't get on, dealing with ActiveX documents. To make it clear I tell you my general intention:
I would like to hyperlink to a specific page on a pdf file. Cause this is NOT possible via UNC/local path in regular way (for URL it works !), I intended to do some workaround by assembling a small *exe which accpets and parses some extra-info like "#<pdffile><pagenumber>
Now I got stuck by parsing that hyperlinks extra-info:-(

Hi fantasy 1001,
If you read me initial question, then you would see that I already talked about that. Unfortunately there's a difference between executing by Run-command and hyperlinking. Try to insert your example e.g. into a Excel cell as a hyperlink and you will see...

greet. catrice
0
 
LVL 9

Expert Comment

by:Dang123
ID: 9693786
catrice,
    I don't think I am completely clear on what you are after yet. Will your VB program reside on the Web server or the client PC? Is the PDF file on the same machine as your VB program? How do you want your program to be launched?

Dang123

0
 

Author Comment

by:catrice
ID: 9700180
Hi Dang123,
like I told: my general problem is that I want to link to specific page/bookmark within a pdf file. All happens on my local machine.
I already spent a lot of efforts to find a solution for it on Acrobat side. Meanwhile I assembled my own program, dealing with Acrobat library to open a pdf, adapt its view, jump to pages/bookmarks etc...pp. Now I finally intend to use this functionality. Everywhere I like (in a Word document, in a Excel cell, just in any Hyperlink object) I want to set a hyperlink to my program and overgive additional info of file and pagenumber, something like:
file://c:\temp\mylinkprogram.exe C:\temp\mypdffile.pdf#page=5.
And my only current problem is that I don't know how to 'parse this argument (extra-info) for hyperlink'.
I know that it's possible to add some extra-info after "?" that in generally the hyperlink is 'accepted' at all. But how to obtain this programmatically in my mylinkprogram.exe ?
I know also that this seems a big workaround and rather awkward solution. But I've no better idea.
If anyone knows a better solution I would be happy to hear it and would not hesitate to spend more points :-)
greet. catrice
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Expert Comment

by:Dang123
ID: 9702604
catrice,
    OK, so if I understand, you want to be able to place a file URL to your program, specifying a pdf file. You want to be able to place this URL in any document on your computer that supports clicking a URL.

    I have been playing with a URL in Word, I see the problem you are having, very interesting. I also tried coming up with an alternative for you, but opening up a pdf in IE with file://C:\temp\mypdffile.pdf#page=5 doesn't work. Can you provide the link you are looking at where you got how to open to a bookmark or page number?

    I'll keep playing with this and see what I can come up with.

Dang123

0
 
LVL 9

Expert Comment

by:Dang123
ID: 10164748

    None of the things I tried worked. I played with this on and off for a long while. Were you ever able to figure this out?
0
 

Author Comment

by:catrice
ID: 10164849
Hi Dang,
unfortunately not :-(
If I will ever find a solution myself, I'll let you know...
Anyway - thanks for participation !
greet. Michael
0
 
LVL 9

Expert Comment

by:Dang123
ID: 10167151

    I have no objections.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 10191173
PAQed, with points refunded (125)

Computer101
E-E Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now