03-20-2018 01:35 PM
I'm having trouble finding an example of code to "Open Word or PDF file at Specific Heading or Page Number". I don't want the user to have to provide instruction for what section they should read. I don't want them to have to find that section either.
Ideally this needs to be done on a read only document.
Any advice is appreciated!
Solved! Go to Solution.
03-20-2018 02:48 PM
Here's what I have so far, I used this as a guide https://msdn.microsoft.com/en-us/vba/word-vba/articles/selection-goto-method-word
03-20-2018 04:32 PM
03-20-2018 07:43 PM - edited 03-20-2018 07:44 PM
Although that code didn't work for me (at least not for read only); it did give me an idea when I was about to give up and go home!! The Range>Selection!
I attached code for opening word at either a page # or at a header.
(The header option will search all headers and will match the first one that contains the input string (you may have to play with this))
Was stuck on this for 5 hours, and was about to abandon this method..
Thanks!
03-21-2018 08:24 AM
03-21-2018 02:22 PM - edited 03-21-2018 02:33 PM
Well that won't work.. lol
Here, I decided to remove the type def controls so only the VI needs to be shared.
03-21-2018 02:31 PM
03-21-2018 02:35 PM
Jeez your quick!
Yeah, I actually noticed that right after I posted haha.
I managed to edit the linked VI in the post above.
04-08-2019 09:04 AM
Hi, would you mind sharing this for 2015 version? Did you guys tried it with pdfs?
Cheers,
Oz
04-09-2019 07:55 AM
I think you can copy the code from the picture provided by ben64.