use Win32::OLE; use Win32::OLE::Const 'Microsoft.Word'; my $word = Win32::OLE->GetActiveObject('Word.Application') || Win32::OLE->new( 'Word.Application', 'Quit' ); ... if ( !$selection->GoTo( wdGoToBookmark, 0, 0, $bookmark ) ) { $LOGGER->warn("Could not find bookmark $bookmark"); return; } #### use Win32::OLE; my $word = Win32::OLE->GetActiveObject('Word.Application') || Win32::OLE->new( 'Word.Application', 'Quit' ); my $wd_const = Win32::OLE::Const->Load($word); #### if ( !$selection->GoTo( $wd_const->{wdGoToBookmark}, 0, 0, $bookmark ) ) { $LOGGER->warn("Could not find bookmark $bookmark"); return; }