I’m a beginner to Powershell and CLI in general, but this task does not need to use either so I’m open to using other tools.

I’m trying to do the following:

  1. Create multiple files from a Word template.
  2. Rename each file based on a list of names found in an Excel/CSV sheet.

Thanks in advance!

You are viewing a single thread.
View all comments View context
1 point

Hey this worked for me yesterday but now I’m having trouble getting it to work again. It just outputs a Word doc titled ‘.docx’ now.

permalink
report
parent
reply
2 points

Make sure the columns in your csv are named properly, my code assumes it’s named just “name”

permalink
report
parent
reply
1 point

By the way, what would be the equivalent code when using a text file for the list of names rather than a csv file?

permalink
report
parent
reply
1 point

Ah, I think that was it. Forgot about the column heading. Thanks for your help!

permalink
report
parent
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 3.1K

    Monthly active users

  • 1.8K

    Posts

  • 30K

    Comments