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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:34:12+00:00 2026-06-13T13:34:12+00:00

I wrote a small piece of code using the dsofile.dll component to modify document

  • 0

I wrote a small piece of code using the dsofile.dll component to modify document properties after upload a file to a web server (to set a guid to link the file to a database record).
I took the component and intructions from here: http://support.microsoft.com/kb/224351

As far as I understanded it don’t use Office to modify the properties.
I implemented it and tested it on my 32 and 64 bit machine (webserver runs on 32bit mode) and all worked fine. I was happy.
But after deploy it to a life machine it didn’t persist the properties on my values, but don’t throw any errors as well!

Here is some code to see what I did:

public void SetProperty(string filename, string property, string value)
{
  m_oDocument.Open(filename);

  var oProp = m_oDocument.CustomProperties;
  try
  {
    oProp.Add(property, value);
  } catch(Exception)
  {
    foreach (CustomProperty cProp in oProp.Cast<CustomProperty>().Where(cProp => cProp.Name == property))
    {
      cProp.set_Value(value);
    }
  }
  if ( Debug)
  {
    m_spy.Spy("filename: " + filename);
    m_spy.Spy("filename modified: " + m_oDocument.IsDirty);
  }

  if ( m_oDocument.IsDirty ) m_oDocument.Save();
  m_oDocument.Close();

  if ( Debug ) m_spy.Spy(GetProperty(filename, property));

}

So I started implement debug code, read articles on the web whole day long.
I ended up installing Office 2010 32bit on the server.

Then after I got a new error:

The document is not an OLE file, and does not support extended document properties

Strange thing the error was only for dotx, xlsx, ff, but not for doc, xls, ff.

After I installed all available updates for Office 2010 and retried.
Then it worked as I wanted and persist the properties I set with the upload page on all files.

So installing Office 2010 as a must on a server isn’t what I expected todo 🙂

  • Does anyone know what components of the Office installation the dsofile.dll need to work without a fill installation?
  • In other words: Can I copy a bunch of files and “register” them on the server manually?
  • Or did I misunderstand something and it is my code?!
  • 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-13T13:34:13+00:00Added an answer on June 13, 2026 at 1:34 pm

    Strange thing the error was only for dotx, xlsx, ff, but not for doc, xls

    This is by design. The dsofile sample only allows accessing files that use the OLE Structured Storage container format. OLE is a dead technology in general, Office was one of the last Microsoft products that still supported it. But that support has been disappearing quickly since the 2007 edition. It is gone for .dotx and .xlsx file formats as well, those are zipped XML files that follow the OpenXML specification. You can’t access them with dsofile.

    You’ll need to go shopping for a better solution, there are many.

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

Sidebar

Related Questions

I wrote a small internal web app using (a subset of) pylons . As
I wrote this small piece of code in C to test memcmp() strncmp() strcmp()
I wrote small piece of code which should toggle reporting box on my page.
In a piece of example code I wrote var as = toArray(document.getElementsByClassName(false)).filter(function (el) {
I wrote a small piece of code that rapidly read and write to a
I am new to JQuery. I wrote a small piece of code ( fiddle
I am new to jquery . I wrote small piece of code <div id=tablediv><table><tr><td><h2>Select
I wrote this small piece of code to test something: #include <stdio.h> int main()
I've wrote a small piece of code that reads the current battery charge/discharge on
Begginer's question. I'm trying to write small piece of code in Visual Studio (VB.net)

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.