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 885935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:59:20+00:00 2026-05-15T12:59:20+00:00

I’m having some trouble with a word add-in. I’m attempting to create a new

  • 0

I’m having some trouble with a word add-in. I’m attempting to create a new document format, and have it sort-of working. The format is just an encoding on top of an existing docx. In other words, I can strip off the encoding and be left with a valid word document.

Saving:

Right now, when the user wants to save a document in the new format, I prompt to save the original, and then read the original from disk, saving a copy in the new format. This leaves 2 files on the filesystem (foo.docx and foo.myformat).

Ideally though, I’d like to intercept the document in the DocumentBeforeSave event, get the document as a byte array, transform it in memory, and just save a single copy. I can’t seem to find a way to get the byte array however.

Opening:

Right now when the user selects a file to open that is stored in my format, I make a temporary copy (tmp\blah.docx), and then just open the document with Application.Documents.Open(tmp\blah.docx…).

I’d prefer instead to create the document from a memory stream, so I can avoid creating temporary files. Is it possible to create a new Word.Document from memory?

Any direction would be greatly appreciated. Thanks much.

  • 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-15T12:59:21+00:00Added an answer on May 15, 2026 at 12:59 pm

    What you are trying to do looks like a classic import/export converter for Word documents to me. From Word 2007 SP2 on, you can use an OpenXML based API to create your converter.

    This MSDN article describes how to do it:

    Introducing the Open XML Format External File Converter for 2007 Microsoft Office System SP2

    There is also a sample project available on MSDN:

    Open XML Converter Interface Sample Code

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have an autohotkey script which looks up a word in a bilingual dictionary
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,

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.