Solved

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

Posted on 2003-11-03
12
233 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
Comment Utility
0
 
LVL 5

Expert Comment

by:fantasy1001
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 9

Expert Comment

by:Dang123
Comment Utility
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
Comment Utility

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

    I have no objections.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
Comment Utility
PAQed, with points refunded (125)

Computer101
E-E Admin
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

771 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

11 Experts available now in Live!

Get 1:1 Help Now