DSO file fails with 0 byte docx file

P

prem1234

Hi
I am using dsofile.dll(latest, which supports office 2007 formats)
to set attributes of office files. The dsofile fails with .docx files
if the file size is 0 bytes(Such a file can be created by
rightclicking on desktop and selecting New ->Microsoft Office Word
Document. If you right click on the created file and select
Properties, It shows Size as 0 bytes). Is there any fix/workaround
available for this bug?

Thanks in advance,
 
J

Jonathan West

prem1234 said:
Hi
I am using dsofile.dll(latest, which supports office 2007 formats)
to set attributes of office files. The dsofile fails with .docx files
if the file size is 0 bytes(Such a file can be created by
rightclicking on desktop and selecting New ->Microsoft Office Word
Document. If you right click on the created file and select
Properties, It shows Size as 0 bytes). Is there any fix/workaround
available for this bug?

Thanks in advance,

Answered in word.vba.general. Please don't post separate copies of the same
question into different groups.
 
T

Tony Jollans

If you mean dsofile.dll then there is not an updated version. You can work
with the xml packages in lots of other ways.

--
Enjoy,
Tony

in message
news:[email protected]...
 
P

prakash tandukar

I am using dsofile.dll (ver 2.1) to read ole file property. But we did not use com dsofile dll. Actually we re-wrote our won general dll(not com). Using our own dll, we were able to read ole property of doc file but we had problem reading docx property. Here is code snippets of creating IStorage object.

extern "C" TZDSOFILE_API IStorage* GetIStorage(char *filename)

{

//Translate filename to Unicode.

WCHAR wcFilename[1024];

setlocale( LC_ALL, "" );

int i = mbstowcs(wcFilename, filename, strlen(filename));

setlocale( LC_ALL, "C" );

wcFilename = 0;

IStorage *pStorage = NULL;

HRESULT hr;

// Open the document as an OLE compound document.

hr = ::StgOpenStorage(wcFilename, NULL,

STGM_READ | STGM_SHARE_EXCLUSIVE, NULL, 0, &pStorage);

if(SUCCEEDED(hr))

return pStorage;

else

return NULL;

}

The object of IStorage is created successfully for doc file while for docx(office 2007) this object is null. What are ways to create IStorage object for docx file?

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top