How do I link to MS word from html & auto navigate to a search phr

G

Guest

Basically, I know the document name and the phrase I want to find. I do not
have bookmarks in the word docuemtn, and would prefer not to add them (lots
of documents, lots of search phrases!). I know if I had a bookmark I could
use location/wordDoc.doc#bookmark , but don't have bookmark.

So, how do I do it?
 
J

Jay Freedman

link said:
Basically, I know the document name and the phrase I want to find. I
do not have bookmarks in the word docuemtn, and would prefer not to
add them (lots of documents, lots of search phrases!). I know if I
had a bookmark I could use location/wordDoc.doc#bookmark , but don't
have bookmark.

So, how do I do it?

From pure HTML, there's no way to do that. If you can use ASP, write a
VBScript routine that uses automation to run the search. The technique for
creating an automation object is essentially similar to that in
http://word.mvps.org/FAQs/InterDev/ControlWordFromXL.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
G

Guest

This is close, but I need to do it from a JSP. I can get close using a macro
in word and do location/wordDoc.doc /mMyMacro, but at that point I don't know
if a way to pass the text I want to look for in (the macro would of course
search for the given text). How do I pass parameters to the macro?
 
J

Jay Freedman

Unfortunately there is no way to pass a parameter to a macro through
Word's command line. You'd have to use a text file that the script
writes to a known location and that the macro looks for, or a known
registry entry. I'm not sure what you can accomplish inside the Java
sandbox -- I'm not a web programmer.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top