How to stop server-generated Word .DOCs from saving with "_files" folders? - asp-classic

I have a Word .DOCument that's being generated by a (classic ASP) server. It's an HTML file that's being output as a .DOC using the application/msword content type. The document is generated fine, saves fine, opens up fine in Word, and is fully editable...
The problem occurs on the next document save in Word. A folder is created in the document's directory with the name "<filename>_files" -- just as if you were saving a web page in IE. Inside this folder are three files: colorschememapping.xml, filelist.xml and themedata.thmx. This happens when originally generating the document using IE or Firefox.
-> How can I prevent these _files folders from being created when saving in Microsoft Word?
(flow: users clicks link in browser, Save (.doc) As..., open .doc in MS Word, edit, save -> "_files" folder)

It doesn't only happen generating file from Firefox/IE.
Microsoft Word 2007 does it when editing any HTML file and saving.
The issue is that if you delete the directory, the HTML file get deleted too.
My workaround:
Edit the file in Word usual
Save the file
Close the file (exit Word, or just
close it)
Right click on file in Explorer
Select "Open With"->Notepad.
Delete the file in Explorer
Go back to Notepad and Save
You now only have a HTML file an no _files directory.

If your output isn't too complicated try using RTF. I've had a decent amount of success by outputting RTF files with a .doc extension.

Word 2007 and 2010 default to multi file HTML documents, linking the document to the content files. This is the default behavior for HTML based documents.
The only way around it, that I've found, is to create a real Word Doc without basing it on HTML, or the user has the select "Single File Web Page" when they do a Save As.

Delete to recycle bin. This deletes both the word doc and the unwanted folder. Restore the word doc and then empty the bin.

Related

Show .txt file on a Hyperlink using WordPress

I want to show a text file online as a description when users click on a link, and I want it to be a text file, not the html page. I want it just like this link https://wordpress.org/plugins/about/readme.txt.
I have uploaded the .txt file and it opens when the user clicks hyperlink, but contents of that .txt file are not shown....
Any idea what I did wrong?
Its about File-Permissions, you have to set them to Public & Read
This solution is provided to "Online Sites" only. (Not for XAMPP)
Go to Your Admin Panel
Go to Media
Upload your Textfile to your Webserver
Browse your Textfile (via FTP-Client) and make a RightClick
Set CHMOD to 744. (read)(This are File-Permissions)
Open the File in your Browser and it should appear normally.
I've tested it 5 Minutes ago, it should work for you.
If you check the link using Developer Tools (on Chrome) or using Firebug (on Firefox), you'll know that the file is missing. You have not uploaded the file to that location.

How to make thumbnail of word file in MSWord 2013..?

I want to make thumbnails of word files i knw the procedure of making thumbnail of word file in MS Word 2007 but dont found anything in MSWord 2013...
So plg Help Me.......
Steps To Make ThumbNail Of Word File In MSWord 2007
1.Open Word File In MS Word 2007
2.File Menu---->Prepare----->Properties---->Advanced Properties----->Summary
then you found a check box save as a thumbnail checked it and then save your file is saved
but i dont find any option in MSWord 2013
Use Thumbnail option is available in File Save As dialog box for Word 2103.
Also when you use export options you will see thumbnail check box.
You can see the save as in this video see the "Save Thumbnail" checkbox
How to export document is explained here , there also you will find thumbnail option
I dont have 2013 and so I am not able to test it. Please see if this helps you out. It is in MS Word 2010, but not sure if it resembles 2013.
http://www.tech-recipes.com/rx/7425/word-2010-save-documents-to-display-with-thumbnail-picture/
Hope it works for you. All the best :)
i was having the same problem (in Word 2013), trying to "Save Thumbnail" for a dotx (a template file). i tried several times, changing the file name each time, refreshing Win Explorer, etc.
i found that first saving it as a normal docx file first generated the thumbnail just fine, and then saving that docx as a template also generated a thumbnail. like it just needed a little kick.

Word file Viewer in wordpress

I am using Karma commercial template. I have make the plugin for to upload document or any type of file, which will save in database and give option of Preview in front end. I have search many plugins for the same. I don't want to download the file but only wanted to preview the file in read only mode.Please help for the same.
I have used javascript code using javascrip plugin:
var documentViewer = $('#document-preview').documentViewer();
But it is not usefull for word file as it is useful for image, pdf and text file.
The Google Document Embedder plugin allows you to display files (PDF, Word, etc.) and has options that will prevent downloads.
http://wordpress.org/plugins/google-document-embedder/

Editing ASPX page with Microsoft Word having XHTML code

I have a xml file which has all the data from my Web based application. Now I am using XSLT 1.0 file to read the data from XML and my application then displays this in aspx page in my internet explorer.
I want to edit the content in Microsoft Word and then save it in word file (doc, docx). When I use File-->"Edit with Microsoft Word" option, I see blank MS Word and no data. I dont know what to do.
Please help and advise.
Open it with notepad, then copy all the content, the paste it in a newly created word document.
That's how straightforward things tend to get with office...

Opening an Excel .xlsx file in IE and following its embedded hyperlinks back to file server

I have an intranet site that lets users open files in the browser (by prompting for download). One of these files is an .xlsx workbook that contains hyperlinks which point to different locations of files (.pdfs, .docs) on the file server in which the .xlsx workbook is located.
It seems the file server path to the workbook is replaced by a "Temporary Internet Files/Content.IE5/" path, leading to the warning "cannot open the specified file" in Excel.
I tried downloading the Excel document first and then following the links, but they're still opening in the temp internet location
EDIT:
For instance, when hovering over the hyperlinks in excel they read: "file:///C:\Documents And Settings\%username%\Local Settings\Temporary Internet files\Content.IE5\40WSS3CB\" + filename
when they should read: "file:///\servername\Departments\Read\" + filename
How can I still open the excel file in the browser and retain the hyperlinks inside and have them not be replaced by the temporary internet files path?
can someone point me in the right direction ? Thanks!
I did some testing, and it almost comes from the way you store links. If you browse through the dialog of Insert hyperlink, then you will end with relative urls. That is, the common base is stored as a reference to the current xlsx file path, and the remainder is stored and displayed as link.
You are totally in the issue Richard Hare mentions, so following the procedure from the microsoft support site should help. It did the trick on my test at least.
UPDATE to sum up down.with.the.bass comments :
One option to solve this, if doable, is to open xlsx file from its network share location and not through the website. If it is forbidden for whatever reason, you may be able to update the links using a macro.
Do you have an option like "Update links on save" enabled?
In an earlier version of Excel it was set in Tools, Options, General-tab, Web Options-button, Files-tab.
Try unchecking it and resaving the document.
I just did in my server the same task (the one I understood):
Uploaded the hyperlink to some asp.net webpage.
<p>
test<br />
</p>
The "book1.xlsx" file has inside a cell which refers (hyperlinks) to some share directory (i.e \\NHSTXX1\TEST\MS OFFICE EXCEL - \\SERVERNAME\FOLDER\OTHER FOLDER )
And when clicked the hyperlinked cell, it opened the share directory I was looking for.
I tried with Firefox.
hope this help
Hyperlinks shouldn't just mysteriously change. I saved an excel file with a hyperlink in it - opened it with html - saved it - open it in excel again - and the link stays the same. So I'm not sure how this could be happening to you(if I understand your situation correctly).

Resources