Hello, I'm trying to create automation with Word with the Visible property set to 0. When I run the code with visible = 1, everything works as expected without errors. However, when I run the code with the visible = 0, I'm getting errors.
Here's a snippet of code. my $WordFile = "$doc_path\\" . $file; my $Doc = Win32::OLE->GetObject($WordFile) || die "Failed to open FTPd document\n"; my $Word = $Doc->{Application}; $Word->{Visible} = 0; my $Merge = $Doc->MailMerge; my $datasrc = ("$datasrc_path\\datasrc.xls"); $Merge->{MainDocumentType} = wdFormLetters; $Merge->OpenDataSource($datasrc,{Connection=>'Entire Spreadsheet'}); my $Selection = $Word->{Selection} || die "Failed!\n"; With the code above it's failing at the last line with the error message: Failed! Thanks in advance for any help! /mark _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs