in reply to Re: How do I Selecting All in a MSWord doc?
in thread How do I Selecting All in a MSWord doc?

Hi Mr. Mushrat,
Don't tell me I can only select text! I want to be able to get everything.
You know, drawings, formating, comments, table of contents, all that stuff.
Can it be done in Perl?
  • Comment on Re: Re: How do I Selecting All in a MSWord doc?

Replies are listed 'Best First'.
Re: Re: Re: How do I Selecting All in a MSWord doc?
by Mr. Muskrat (Canon) on Jan 24, 2003 at 23:47 UTC
    I'm sure that it can. I read your question as "how do I select all of the text" instead of "how do I select everything". Create yourself an MS Word macro that selects everything in an MS Word doc and then view the code of the macro. It will give you the information you seek.
      great Idea!
      Here's what I got:
      Sub LN_Select_all()
      '
      ' LN_Select_all Macro
      ' Macro recorded 1/24/03 by LameNerd
      '
          Selection.WholeStory
          Selection.Copy
      End Sub
      
      This tells me that I should change my Perl code from:
      my $select1=$WordDoc1->SelectAll() or die "Could not do SelectAll() on doc1\n"; $select1->Copy();
      to:
      my $select1=$WordDoc1->WholeStory() or die "Could not do WholeStory() on doc1\n"; $select1->Copy();
      right?