"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/