Word 2007 opening problem after saving!

J

Jeffery B Paarsa

Hello,

Through a VB app. developed by Visual Studio 2005 I am opening a Word
document template, pupulate it from VB Userform data and print it. So far no
problem but after printing I save the document and try to close the document.
While it seems document is closed but Word empty window stays open.

Now when I go to the directory I have saved the document and try to open the
document it can not open it and it gives me the following dialog error.

The Office Open.XML file (Paarsa)(20090519010537).doc cannot be opened
because there are problems with the contents. Clicking on the Details >>>
shows the following:
Details
Unspecified error
Location: Part:/word/header1.xml, Line: 2, Column: 3263

How can I find out what is wrong with my document?

Strang is that I do this for multiple Word Template some works with no
problem and some does not... I tend to beleive there is something wrong
inside of my Word Template X.dot that does not work. How can I find this
problem?

I have posted this on Word General Questions too but so far no suggestion.
 
C

Cindy M.

Hi Jeffery,

Mmmm, hard to say without knowing what your code does, other than print, save
and close.

The first question that comes to my mind is whether you have the Background
printing option on? If so, your code may be saving/closing before the document
has completely spooled to the printer and that could be causing problems?
Now when I go to the directory I have saved the document and try to open the
document it can not open it and it gives me the following dialog error.

The Office Open.XML file (Paarsa)(20090519010537).doc cannot be opened
because there are problems with the contents. Clicking on the Details >>>
shows the following:
Details
Unspecified error
Location: Part:/word/header1.xml, Line: 2, Column: 3263

How can I find out what is wrong with my document?


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
J

Jeffery B Paarsa

Hi,

What I did was take one of the working templates and just copy the body of
the damaged template into the working template and save it... Now it works...
From the error message I got the idea that problem is in the Header area:
 
C

Cindy M.

Hi Jeffery,
What I did was take one of the working templates and just copy the body of
the damaged template into the working template and save it... Now it works...
From the error message I got the idea that problem is in the Header area:

Glad you got it fixed. Yes, the error plus your workaround does indicate that
the file's internal structures became damaged, somehow.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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