Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6226327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:00:30+00:00 2026-05-24T09:00:30+00:00

I have a word document template that I need to do a find and

  • 0

I have a word document template that I need to do a find and replace on.
For example I need to replace <address 1> with 1 Test Street.

I have tried doing this using a macro which I can run from command line but you don’t seem to be able to pass in arguments and therefore cannot edit either the pattern you are searching for or the thing to replace it with.

I need to it using PHP ultimately so had been looking for something I can just call with an exec, I did find a library called PHPWord that looked very useful but the way it worked was to parse the .doc file into an xml file and this wasn’t working properly resulting in words being split in half and therefore no good for a str_replace.

Finally I looked at using VBScript, I have no experience with this at all and could not get it to work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:00:34+00:00Added an answer on May 24, 2026 at 9:00 am

    Why don’t you use Interop to access the Word document.
    You will have to use .NET for this, and you can create a console application.

    Have a look at Interop Class Namespace and this for an example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Word document that starts with a Table of Contents. I need
I have a word document that was saved as xml. now I need to
I have created a document template file (.dotx) in Word 2007 and in this
I have a document that transforms xml to word. it starts like this: <?xml
I have been given two different Microsoft Word document that my virus scanner has
I have a need to populate a Word 2007 document from code, including repeating
I need a way of generating a word document (from a template or something)
I have requirement where I need to allow users to upload a Word document
I have a pre-made Word Template that has a table. I would like to
We have an Oracle BPM 10g activity that: Reads a form-fill protected Word document

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.