mibuso.com

Microsoft Business Solutions online community
It is currently Sun May 19, 2013 12:42 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: [Solved] Can I hyperlink to a MS Word bookmark?
PostPosted: Wed Sep 15, 2010 9:10 pm 
Offline

Joined: Mon Sep 24, 2007 7:16 pm
Posts: 46
Location: Louisville, KY
Country: United States (us)
Hello, we've got NAV 5.1 with SQL Server 2005. We're able to open a Microsoft Word document using a Hyperlink in NAV like this:
HYPERLINK('file:///c:\tmp\doc1.docx');
This also works:
HYPERLINK('c:\tmp\doc1.docx');
However, what we want is to be able to open up the document to a certain point where we've put a bookmark. After creating the bookmark called "test2" in Word, I tried the following code in NAV:
HYPERLINK('file:///c:\tmp\doc1.docx#test2');
and get the error:
You tried to hyperlink to this target:
file:///c:\tmp\doc1.docx#test2

Do you want to place that hyperlink target on the clipboard?

Is it not possible to open a Word document to a particular bookmark?

Thanks!


Top
 Profile  
 
 Post subject: Re: Can I hyperlink to a MS Word bookmark?
PostPosted: Wed Sep 15, 2010 9:26 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6977
Location: L.I., New York
Country: United States (us)
I don't have any personal knowledge - but perhaps you can find something to help you here:
http://msdn.microsoft.com/en-US/library/5ykkex00(v=VS.80).aspx

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org


Top
 Profile E-mail WWW  
 
 Post subject: Re: Can I hyperlink to a MS Word bookmark?
PostPosted: Thu Sep 16, 2010 1:56 pm 
Offline

Joined: Mon Sep 24, 2007 7:16 pm
Posts: 46
Location: Louisville, KY
Country: United States (us)
Thanks but the bookmark is not the issue. We've created the bookmarks directly in the Word document. I just need a way for NAV to open the document to the topic (bookmark) we want but that seems to not be possible using Hyperlink.


Top
 Profile  
 
 Post subject: Re: Can I hyperlink to a MS Word bookmark?
PostPosted: Thu Sep 16, 2010 4:39 pm 
Offline

Joined: Mon Sep 24, 2007 7:16 pm
Posts: 46
Location: Louisville, KY
Country: United States (us)
Since it seems that this may not be possible using the Hyperlink function, I looked into Word automation and was able to do what I wanted with that. FYI, here's what I did, as a test, after creating a bookmark called "Test1" in a Word document:
- create the needed automation objects: application, document, and bookmark
- open the document then go to the bookmark

Here's the pertinent code:
WDoc := WApp.Documents.Open(FilePath);
BK := 'Test1';
WSBookmarks := WDoc.Bookmarks;
WSBookmark := WDoc.Bookmarks.Item(BK);
WSBookmark.Select;

Thanks!


Top
 Profile  
 
 Post subject: Re: Can I hyperlink to a MS Word bookmark?
PostPosted: Thu Sep 16, 2010 7:04 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6977
Location: L.I., New York
Country: United States (us)
Perhaps this belongs in the tips & tricks section!

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org


Top
 Profile E-mail WWW  
 
 Post subject: Re: Can I hyperlink to a MS Word bookmark?
PostPosted: Fri Sep 17, 2010 5:20 pm 
Offline
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7493
Location: Milan
Country: Italy (it)
[Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Tips & Tricks' forum]

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
 Post subject: Re: Can I hyperlink to a MS Word bookmark?
PostPosted: Mon Sep 27, 2010 9:09 pm 
Offline

Joined: Thu May 01, 2008 7:45 am
Posts: 20
Location: India
Country: India (in)
The Hyperlink you have specified has syntax error
it should be
Quote:
file:///c:/tmp/doc1.docx
instead of

Quote:
file:///c:\tmp\doc1.docx


Try this and let us know if it helped!!

_________________
Mayank Bhardwaj
Visit My Blog at
http://extremeengineers.net/


Top
 Profile  
 
 Post subject: Re: Can I hyperlink to a MS Word bookmark?
PostPosted: Mon Sep 27, 2010 9:36 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6977
Location: L.I., New York
Country: United States (us)
GaryD wrote:
, I looked into Word automation and was able to do what I wanted with that.


He mentions he got what he needed already.
It's also been marked as solved.

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org


Top
 Profile E-mail WWW  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: