Saving in Word (documents in html) without extension - problem in

  • Thread starter Vivek Gilbert John Fernandez
  • Start date
V

Vivek Gilbert John Fernandez

Hi,

Our vendor stores word docs in their Database (html format) without .htm
extensions. When we call them up to edit, they come up without extensions.
When you make a change and hit save, word2003 (not other versions) pops up a
box:
<<
A file error has occurred
Try one of the following:
* Check the disk drive ...
.....
It's easy to reproduce - it is not dependent on the call to word from our
Vendors software:

1) Open a word doc and "Save as" html.
2) Remove the .htm extension
3) Open the file in word
4) Make a change and hit save.

This does not happen pre word2003.
 
B

Beth Melton

I can reproduce the issue you describe but I haven't decided if I'd
consider it a bug.

How Word reads a file was modified in Word 2003 and file extensions
are an important aspect of the file. Without them Word needs to
determine which converter to use to open the file and I'd say they are
using them in order to determine the format for saving the file.

--
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/


"Vivek Gilbert John Fernandez"
 
V

Vivek Gilbert John Fernandez

Hi Beth,

Thanks for your response and the explanation as to why it worked in past
versions.

My main line of argument is that if word opens this doc (ie. File->Open not
double clicking it) and thus understands the format , it should save it in
that format without alteration to the filename. Another consequence of this
change in word2003, is that the abilitiy to surround a filename in double
quotes to ensure that no extension is appended, is also gone.

Regarding this new method of determining the format to save in - why is word
trying to figure it out when saving, instead of noting it when it first opens
the doc. Then only if someone uses "Save As" is it necessary to even consider
a new format - I thought that this was the main difference between "Save" and
"Save As".

In any case Beth, will you be able to give me a direction on this - will
this be up for consideration with Microsoft or do I hammer the vendor into
considering changes on their side?

Many thanks again.

Beth Melton said:
I can reproduce the issue you describe but I haven't decided if I'd
consider it a bug.

How Word reads a file was modified in Word 2003 and file extensions
are an important aspect of the file. Without them Word needs to
determine which converter to use to open the file and I'd say they are
using them in order to determine the format for saving the file.

--
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/


"Vivek Gilbert John Fernandez"
 
B

Beth Melton

"Vivek Gilbert John Fernandez"
Hi Beth,

Thanks for your response and the explanation as to why it worked in
past
versions.

Just so you know, that was an 'educated guess' as to why it is working
differently. I do know they changed how Word 2003 opens and reads
documents but I'm not 100% certain that is the exact cause. About 95%,
though. ;-)
My main line of argument is that if word opens this doc (ie.
File->Open not
double clicking it) and thus understands the format , it should save
it in
that format without alteration to the filename.

That sounds like the logical process to me as well. Once a file is
opened the file format should be recognized and retained by Word.
Another consequence of this
change in word2003, is that the abilitiy to surround a filename in
double
quotes to ensure that no extension is appended, is also gone.

I'm unable to reproduce the ability to save a file without an
extension. You can override the *.doc extension by surrounding the
filename and extension in quotes, such as "foo.bar" and the *.doc file
extension is not appended but I'm unable to save a file without an
extension in Word 95-2003.

What version of Word and what operating system were you using when you
were able to do this and did you have file extensions displayed?
Regarding this new method of determining the format to save in - why
is word
trying to figure it out when saving, instead of noting it when it
first opens
the doc. Then only if someone uses "Save As" is it necessary to even
consider
a new format - I thought that this was the main difference between
"Save" and
"Save As".

I'm not disagreeing with this logic either. Again, I do not know the
exact method MS uses to open and save files but I do know these
methods changed.

Although, as a programmer I can see the logic behind this. In the past
some HTML files, and other file formats, have been interpreted
incorrectly past regardless of the file extension. So for example Word
would try to open a file such as "Web.htm" using a text converter.
We've had numerous reports of this issue in the past. Here are a few
previous threads if interested in viewing them:

http://groups-beta.google.com/group...527c4c3c40e6c?thread_id=1cf81acfe8beb768&mode

http://groups-beta.google.com/group...9539cdb714bfe?thread_id=bc980e71c7cc9dfd&mode

Considering this issue, it wouldn't surprise me if they are reading
the file extension in order to apply the correct converter during a
Save.
In any case Beth, will you be able to give me a direction on this -
will
this be up for consideration with Microsoft or do I hammer the
vendor into
considering changes on their side?

I will be passing this information along but I can't say if Microsoft
will view this as a bug or 'by design'. My guess is 'by design' since
I suspect they modified the behavior in order to correct the issue I
previously noted. But if they should view it as a bug, well...I don't
think it's one that would be a top issue. If I were in your position I
would take it up with the vendor or seek an alternate solution.

As an alternate solution I'm thinking you might be able to create a
macro that will do what you want. For example this code will save a
new HTML document without a file extension and the error is not
encountered:

ActiveDocument.SaveAs FileName:="Doc4.", FileFormat:=wdFormatHTML

Of course it would need to be modified and a variable for the file
name would need to be used for the file name, and it looks like you
would need to create new files rather than overwriting the current
file. For example this code will fail with the same error on files
previously saved in an HTML format with no file extension:

Dim strFName As String
'Pickup active document name and concatenate a dot
strFName = ActiveDocument.Name & "."
ActiveDocument.SaveAs FileName:=strFName, FileFormat:=wdFormatHTML

Perhaps the developer or someone over in one of the Word VBA
newsgroups could help you create a macro you could use. I'm thinking
the macro could create a new document using the context of the current
document, delete or close the original HTML file, and save the new
document using the same file name to take its place. This should be
enough to get you started anyway.

--
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 

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