Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2003-11-03
12
Medium Priority
?
241 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
Technology Partners: 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

Technology Partners: 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!

Question has a verified solution.

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

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 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…
Suggested Courses

722 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