Use perl to find the font properties of MS-Word document -
What do I need to do ... read a word file and add the forward tag based on the properties of the font Or to differentiate as paragraph. However, I have to do it through Pearl .. Is it possible ??? Any help will be appreciated. Thanks!
I need more information to help you identify the words that need the process. In the example I just text some ()
#! / Usr / bin / perl Looking for Modern: Pearl; Use Win32 :: OLE; Use win32 :: OLE qw (with); Use Win32 :: OLE :: Variant; Use Win32 :: OLE :: Conte 'Microsoft Word'; $ Win32 :: OLE :: Alert = 3; Print "Start Word \ n"; My $ word = win32 :: OLE- & gt; GetActiveObject ('Word.Application') || Win32 :: OLE- & gt; New ('Word.Application'); $ Word- & gt; {'Visible'} = 1; $ Word-> {DisplayAlerts} = 0; My $ file = $ word- & gt; Document-> Open ("./fonts.docx") or Win32 :: OLE- & gt; Last erroor; $ Word- & gt; Selection-> Homaki (wdStory); $ Word- & gt; Selection-> Search-> {'Text'} = 'some'; $ Word- & gt; Selection-> Find-> Executed (); "Font Size: [", $ word-> Selection-> Font- & gt; Shape (), "]"; "Font name: [", $ word-> Selection-> Font- & gt; Name (), "]"; $ Word- & gt; Skip;
Comments
Post a Comment