Solved

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

Posted on 2003-11-03
12
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

623 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