Question

I have several MS Word documents stored as BLOBs in a SQL Server database.

I need to be able to:

  1. Open the document
  2. Set a few DOCVARIABLEs
  3. Print the document

I am very familiar with Word automation but I don't know how to open a document from the database. I am also open to solutions other than automation if they will accomplish the result.

I would very much like to avoid using a temporary file.

History:

I am rebuilding a legacy system written within Access 2003. The legacy system uses a control called UnboundObjectFrame to which the value is assigned. The frame then exposes appropriate automation objects. I can't find any equivalent control in .Net.

Jacob

Was it helpful?

Solution

Unfortunately, the only option is to create a temporary file. Office does not support opening documents from any sort of memory stream or byte array. If you don't know how to programmatically query a database column and create a temporary file, please post a new question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top