Word Document with images File size - ms-word

I am actually placing screen shots into the MS word document. When i save the document am not sure of which format the image is being considered. The size of the Document is becoming very large. Is there any option in MS word to save the document as a smaller file.

Whilst this isn't a programming-related question, I'll attempt to answer what I think is your question.
All images saved in Word are stored at their original resolution, at their original size, regardless of any resizing/cropping that is performed in Word itself. If you want to reduce file-size, crop/compress the images externally before inserting them into a Word document.

Look at Word Tips sites like
http://www.klariti.com/microsoft-word/Reduce-Microsoft-Word-File-Size3.shtml
and apply the solution.

A quick technique i use to reduce the size is open up MSPaint via Start Menu > Run ...and copy the screenshot in there. Then you can save the file as a JPG, and Insert the JPG into your word document by accessing Insert > Picture > From File.

Related

Insert an Image In a Word Document that Changes When Image File Changes

I currently have a report being written in word. I have JPG files of graphs that are output from an Analysis. I would like to have the JPG image display in my word document but if I replace the file it would update the image in the word document.
Example: This image is in a folder named graph.jpg I would like to have this displayed in my word document report.
But later I may re run my analysis and overrite graph.jpg with the image below and I would like my word document to update reading that file.
You don't need any code for this. All you need to do is paste your image into the document with the 'paste link' option. That way, Word will the document whenever the image changes.

Trying to drop the contents of one Word document into another

This is in an IDTExtensibility2 (not VSTO) Word AddIn. I'm trying to do a drag drop where I programatically give the contents of one document to DoDragDrop(). The problem is instead of dropping the contents in the other document, it inserts it as an embedded Word document.
My code is basically:
srcDoc.Activate();
activeWindow = srcDoc.ActiveWindow;
selection = activeWindow.Selection;
selection.WholeStory();
selection.Copy();
data = Clipboard.GetDataObject();
DragDropEffects effect = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Scroll);
How can I have it paste the contents instead of pasting the document?
Please note, I want to paste all of the content in the source document into the insertion point of the drop in the destination object. So it's not copy over the full contents of the destination (therefore a file based approach won't work).
And it's drag/drop so I don't have the control that Clipboard.Paste() provides to specify the pasting format. In addition, the format I need is the native DOCX format to bring all properties & formatting across.
thanks - dave

Is it possible to attach two word file with each other?

Like in MS Excel one csv file may contain more than one sheet, Like this what I have to do is I want to keep all the theory in one word file and the programs in another word file. But I want to attach these both file with each other as a single DOC file.
Like a single DOC file contain theory as well as programs, which is open as two separate content/file.
Something close to what you want to do is the following:
In new Word Document Select your "View" Tab and then Select "Outline View".
Then Select "Show Document". The "Insert Button will now be visible.
You can now insert various documents in this document.
Unfortunately as far as I know this will have links into the original Documents which you can then open, edit and access from the new document.
Try it out and let me know!
Also, you can maybe try Microsoft One Note, I think this is probably what you looking for. See partial screen shot below for an idea.

MS Word (2007) - increased file size after removing content

MS Word (2007 in my case, but I had that experience also with 2010, didn't use 2013 yet) surprises me with the file size it uses - I have a standard .docx of 96 kB, after changing one character (a 7 to a 6) and saving again, it had 101 kB. I had in mind that Word sometimes saves additional information, so I searched a bit and found that in the Office button menu (the round button in the upper left corner) there is Prepare and then Inspect Document. I chose to have the Properties removed and also Header and Footers. Then, after saving the file size was 104 kB.
So, what is MS Word doing when saving documents after small changes or deleting content, that file size can increase afterwards. And how to get rid of this behaviour.
Word file sizes can increase if there's "dross" in the file: sometimes, a document becomes damaged and left-overs accumulate. If the damage is not critical, Word will work around it, but the "bad" information often remains in the file. Under some circumstances, Word encounters the problem every time it saves, which will cause file size to increase.
It can help to save the document to another file format, such as RTF, HTML or an earlier version of Word, then opening that file in Word. Another thing you can try is to copy/paste the content to a new document WITHOUT any section breaks and WITHOUT the last paragraph mark (because "dross" often accumulates in the non-visible section information).
But these attempts should always be done on a COPY of the document because information can get lost in the dual conversion process.
According to support.microsoft.com/en-us/kb/111277, the file size of your Word document may increase unexpectedly in the following situations:
Allow Fast Saves option is turned on. A fast save appends the changes to the end of your document, which increases the size of the document. By contrast, when you turn off the Allow Fast Saves option and save the document, Word performs a full save, which incorporates all your revisions (instead of appending them). If you perform a full save after a file was fast saved, Word reduces the size of the file.
Note Even with the Allow Fast Saves option turned on, Word periodically performs a full save of your document. As a result, the file size of your document may change substantially between save operations.
The option to Embed TrueType Fonts is selected. To check this, on the Tools menu, click Options and then click the Save tab.
You are automatically saving versions of a document. On the File menu, click versions. Check to see whether Automatically Save a Version on Close is selected.
If you open a document from a previous version of Word, Word may temporarily allocate more disk space for the document than is actually necessary.

Merging multiple MS Word documents already saved in one docx file with OpenXML

I did the merging multiple documents into one singe document (Test.docx) with FeedData and it works fine.
When I open the merged document Test.docx with WinZip, content looks like this:
File1.docx, File2.docx, File3.docx, where all merged documents are being stored like external files into Test.docx file.
Now wondering if there are possibility to be created one single document Test.docx with whole content inside instead of multiple files to be stored as it noted above, this will helps me a lot when I'm making Search / Replace content since like this, we opening file by file procedure?
Note: If I open the Test.docx via MS Word and press "Save", MS Word do the job but I would like to produce the same result via code?
Thank you in advance.
Best
Tod
Take a look at this article, and see if this is what you're looking for:
http://blogs.msdn.com/b/brian_jones/archive/2008/12/08/the-easy-way-to-assemble-multiple-word-documents.aspx
Another way to merge multiple Open XML DOCX files into a single file is using the DocumentBuilder module that is part of Open-Xml-PowerTools, which is an open source lib on github.
https://github.com/OfficeDev/Open-Xml-PowerTools
more info about DocumentBuilder: http://openxmldeveloper.org/wiki/w/wiki/documentbuilder.aspx
Given that you want to do search and replace, check out OpenXmlRegex, also part of Open-Xml-PowerTools:
http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2014/07/22/search-and-replace-content-in-docx-pptx-using-regular-expressions.aspx
All open source, all free (both as in beer and speech).