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!
0
Answers
http://msdn.microsoft.com/en-US/library/5ykkex00(v=VS.80).aspx
http://www.BiloBeauty.com
http://www.autismspeaks.org
- 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!
http://www.BiloBeauty.com
http://www.autismspeaks.org
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
it should be instead of
Try this and let us know if it helped!!
Visit My Blog at
http://extremeengineers.net/
He mentions he got what he needed already.
It's also been marked as solved.
http://www.BiloBeauty.com
http://www.autismspeaks.org