in reply to Re^6: M$ Word ole hyperlink
in thread M$ Word ole hyperlink
I'm glad poj's other solution is working for you.
Since you continued the discussion in this sub-thread after declaring the other solution as working, I assumed you still wanted to investigate my alternative. My further post was to provide a framework to further debug the issue, since my code worked exactly as I expected for me, but apparently didn't for you. If you're still interested, feel free to run the code and, if the results don't match mine, post your results.
Whether or not you continue down my bunny trail, I suggest changing
... to ...my $MSWord = Win32::OLE->new('Word.Application') or die $!; $MSWord->{'Visible'} = 1; my $doc = $MSWord->Documents->Open("c:/temp/Word.doc");
my $MSWord = Win32::OLE->new('Word.Application') or die Win32::OLE->La +stError(); $MSWord->{'Visible'} = 1; my $doc = $MSWord->Documents->Open("c:/temp/Word.doc") or die Win32::O +LE->LastError();
... because Win32::OLE routines do not set $!, so error messages are not seen using the original die $! call.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: M$ Word ole hyperlink
by 3dbc (Monk) on Feb 02, 2017 at 23:00 UTC |