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

  • Home
  • SEARCH
  • 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 8108591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:09:38+00:00 2026-06-06T01:09:38+00:00

I am building a website application for a local charity, it is going well,

  • 0

I am building a website application for a local charity, it is going well, I seem to overcome most challenges, but this is a huge problem I have, and I don’t even know if it is possible.

I want the user to be able to click a button and output a Microsoft Word file by mail merging a text file and a prebuilt template (dotx) file, both on the server side.
The text file will only contain one record that has been taken from an mySQL database and generated via PHP.

I know about using XSLT to modify the document file inside the document zip, but I do not have access to the php.ini on the charities server, and anyway it seems a little bit too much considering how simple it is to use create a Macro to Mail Merge.

So I am now thinking of using the Word Object Model, it would have to be via Javascript, but most of the users use either Firefox or Chrome, so would for eg. var oApplication = new ActiveXObject("Application.Word"); work with those browsers, or could I use simply = new Object("Application.Word");?

Also can I confirm that the object in Javascript would then have the same function names and parameters as those in VBA, I have never tried using Word via Javascript, but if it’s the same as VBA, then I should be fine.

I am using my localhost for development and the file structure is:

  • template\conformation.docx
  • template\data.txt

Where data.txt is the PHP generated CSV of the data taken from the database.

  • 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-06-06T01:09:40+00:00Added an answer on June 6, 2026 at 1:09 am

    ActiveX/COM automation (which is required to access word.application) is supported in IE only, no other browser supports it in any way.

    If it were supported you would still not be able to easily interact with the Word files on the server from within the client.

    You could generate the file on the server ( Generating word documents with PHP ) although to access functionality that’s actually built into Word itself (like a mail merge) you would need to programmatically interact with a real instance of Word that’s been installed on the server (using PHP/COM/word.application) to control it, to avoid this, you would do whatever the mail merge does, manually.

    Another alternative would be to have a Word document that contained VBA code that interacted with a PHP web service to generate the output document.

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

Sidebar

Related Questions

Im thinking about building an application on our website to track order places through
I am building a local intranet web application which uses the current user's AD
We started building our website / application back in 2006, and chose to use
I am currently working on a building community website in PHP. This contains forms
I am following the tutotial on Apple's website for building your first iPhone application,
I’m building a application that monitors information on a website. The website allows you
I'm building an application which I'd like to have it connect to a website
I'm building an FB application. I'm using the JS SDK on my website for
I'm building a simple website generator application in Rails 3.0. I'd like a publish
I'm building a website with PHP & mySQL. In my application, the categories of

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.