How to import data into an email form and sent to a specific user?

I would like to automate the following, any type of VBScript, PowerShell or Batch Script would be fine.
Take an existing text file and import it into a word type template and send that template as an attachment via email - or
Take an existing text file and import It into the body and would look as a form.

Is there any existing software which could do this?
The software or script should fit into a current script so that when the script runs, so does this import and formatting.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
What does "form" mean in this context?
100questionsAuthor Commented:
To look like a form, where there are headers tgat are bold, titles that are bold, and where fields would be filled by the data which is imported
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Only building a HTML table is simple. Anything else is very specific to data and desired look. If you can create HTML code, sending it as email with PS is easy.
Webinar: Cyber Crime Becomes Big Business

The rising threat of malware-as-a-service is not one to be overlooked. Malware-as-a-service is growing and easily purchased from a full-service cyber-criminal store in a “Virus Depot” fashion. Join us in our upcoming webinar as we discuss how to best defend against these attacks!

100questionsAuthor Commented:
I am unable to do that
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Can we assume the text file to be in CSV format at least? If so we can build a very basic HTML table:
import-csv ImportFile.csv | convertTo-HTML -Head TheTitle -as Table | Out-File Report.html

Open in new window

You can add arbitrary HTML code to that with -PreContent and -PostContent, e.g. to apply a style sheet, or whatever. Use the above code to create a file you can view in a browser to see if the layout suits you.
That is all PowerShell can give you for help. Everything else needs to be done by you, or you need to post details and examples so Experts might help you further.

As soon as the HTML code works for you, next step is sending the mail:
Send-MailMessage -SmtpServer -From -To -Subject Report -BodyAsHTML -body ((Get-Content Report.HTML) -join ' ')

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
100questionsAuthor Commented:
Thank you. Have not tried this yet however.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Software

From novice to tech pro — start learning today.