Solved

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

Posted on 2003-11-03
12
237 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending a email via excel using vba 6 109
Adding to a VBA? 6 84
SQL VB connection works in one PC and doesn't in another 15 73
Collapse and expand table in Word 2010 2 92
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

762 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