Search word documents having datasource

Welcome Forums General PowerShell Q&A Search word documents having datasource

Viewing 1 reply thread
  • Author
    Posts
    • #196778
      Participant
      Topics: 1
      Replies: 0
      Points: 11
      Rank: Member

      Hi,

      I'm new here.

      Is there a way to list all word documents, within a nested folder structure, having a (mailmerge) datasource ?

      Thank you.

    • #196799
      Participant
      Topics: 10
      Replies: 1381
      Points: 1,509
      Helping Hand
      Rank: Community Hero

      Welcome to Powershell.org. Yes. It's going to be two basic parts:

      • Find all Word files – look at Get-ChildItem with the Include and Recurse parameters. =
      • Find Word files with a MailMerge source – This is a bit more painful as you will need to open each document and check for the mailmerge source. Here is an example

      There are some Powershell Modules and even ways to open Word as XML, but this should give you a starting point to put a script together.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.