Re: Microsoft Word search and replace issue

2005-05-23 Thread Chris Cox
: Friday, May 20, 2005 5:15 PM Subject: Re: Microsoft Word search and replace issue That is a more efficient way to do it; cycle through the collection. Good call! The problem here is that the document contains ActiveX controls and, as noted, the only way to access ActiveX controls embedded

Re: Microsoft Word search and replace issue

2005-05-20 Thread Greg Chapman
: use Win32::OLE qw(in); use Win32::OLE::Const 'Microsoft Word'; my $word = Win32::OLE-new('Word.Application'); $word-{visible} = 1; my $doc = $word-{Documents}-Open(C:\\Word\\Certificate.doc); and then foreach my $shape (in $doc-Shapes) { $shape-{TextFrame}-{TextRange}-{Text} =~ s

RE: Microsoft Word search and replace issue

2005-05-19 Thread Chris Cox
Hi all, Further on this, I found I had to loop over all the Shapes in the Shapes collection. eg: use strict; use Win32::OLE; use Win32::OLE::Const 'Microsoft Word'; my $word = Win32::OLE-new('Word.Application'); $word-{visible} = 1; my $doc = $word-{Documents}-Open(C:\\Word\\Certificate.doc

Re: Microsoft Word search and replace issue

2005-05-17 Thread Todd Beverly
'Microsoft Word'; my $word = Win32::OLE-new('Word.Application'); $word-{visible} = 1; my $doc = $word-{Documents}-Open(C:\\Word\\Certificate.doc); my $search = $doc-Content-Find; my $replace = $search-Replacement; $search-{Wrap} = wdFindContinue; $search-{Text} = #tPreferredName#; $replace-{Text} = Chris

Microsoft Word search and replace issue

2005-05-16 Thread Chris Cox
Hi All, I'm trying to write a basic perl script to open a Word document, change some predefined values to something else. It works fine on a basic document, but anything with text boxes it doesn't work at all. The script I run is: use strict; use Win32::OLE; use Win32::OLE::Const 'Microsoft

Re: 255 char limit Win32::OLE Microsoft Word?

2004-02-25 Thread Ryan Nowakowski
I'm doing this to init the word object: my $mswordapp = Win32::OLE-GetActiveObject('Word.Application') || Win32::OLE-new('Word.Application', 'Quit') or die Can´t start Microsoft Word: . Win32::OLE-LastError(); $mswordapp('word')-Documents-Open('myworddoc.doc') or die

Microsoft Word

2001-12-18 Thread [EMAIL PROTECTED]
::OLE::Const ('Microsoft Word') ; use IO::File ; use LWP::UserAgent ; use CGI ; $Output = new CGI ; $ua = new LWP::UserAgent ; ### print $Output-header(-type='text/html',-expires='now'); print $Output-start_html

Re: Microsoft Word HTML clean up

2001-04-17 Thread Hermen Lesscher
Get HTML-Kit, it uses HTML Tidy, works great and is easy to configure (many options) http://www.chami.com/html-kit/ Hermen 9-4-01 22:51:28, "Konstantin Naumov" [EMAIL PROTECTED] wrote: Hello! How to clean up Word HTML? I want to remove all "unnecessary" tags Frodo Hermen

Re: Printing Files via Microsoft Word

2001-02-10 Thread James E Keenan
has lots of paper in it. 4. Select all the word documents, right click, and select print This wouldn't work because the documents were, with minor exceptions, NOT Microsoft Word documents. What they largely were was C program files ending with .c, .h, .ih, .mem, etc. -- plus some oddball other

RE: Printing Files via Microsoft Word

2001-02-06 Thread Carl Campbell
push( @Dirs, $File ) if ( -d "$Dir\\$File"); print "."; PrintMSWordFile ("$Dir\\$File") if ($File =~ /($FileSpec)$/i); } foreach $File (@Dirs) { FindFiles("$Dir\\$File"); } } print &qu

RE: Printing Files via Microsoft Word

2001-02-06 Thread Christopher Hahn
ubject: RE: Printing Files via Microsoft Word # # This script will scan for MS Word files, through a specified path, # and print them to the default printer. # SNIP $Word-ActiveDocument-PrintOut({ Background = 0, Range = wdPrintAllDoc