<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Discussion</title><link href="https://sourceforge.net/p/openmcdf/discussion/" rel="alternate"/><link href="https://sourceforge.net/p/openmcdf/discussion/feed.atom" rel="self"/><id>https://sourceforge.net/p/openmcdf/discussion/</id><updated>2018-01-03T15:05:31.367000Z</updated><subtitle>Recent posts to Discussion</subtitle><entry><title>Determine number of inline images in a binary Word documenmt</title><link href="https://sourceforge.net/p/openmcdf/discussion/1199792/thread/54abda45/?limit=25#4cc0" rel="alternate"/><published>2018-01-03T15:05:31.367000Z</published><updated>2018-01-03T15:05:31.367000Z</updated><author><name>Joey Picinich</name><uri>https://sourceforge.net/u/picaz/</uri></author><id>https://sourceforge.netc543e80d0b7a961490411e4d81321e09c4d61091</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Pete&lt;br/&gt;
I have been on vacation but thanks for your reply. I have followed that document to find the images. The fib does have an offset into the #Table stream of which I got but it seems that from there it does not follow the spec. Maybe I am missing something. Do you have any examples of this? I will probably hop bacl on this project later today. Any sage advice?&lt;/p&gt;
&lt;p&gt;Joey&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Example code causes fatal errors so it can't compile/buildon my system...</title><link href="https://sourceforge.net/p/openmcdf/discussion/1199792/thread/f071271c/?limit=25#96f2" rel="alternate"/><published>2017-12-24T11:42:00.912000Z</published><updated>2017-12-24T11:42:00.912000Z</updated><author><name>Pete Dashwood</name><uri>https://sourceforge.net/u/petedashwood/</uri></author><id>https://sourceforge.net990796630e4868893b403c88620cc4cddd86a1d9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;During the last couple of days I have done a lot of experiments with this software and studied a lot more about compound files. The example noted above is in a number of cases of "example code"in the (otherwise very good) HelpFile and it simply doesn't work. By studying the use of delegates and Action in C# I was finally able to correct the code so that it works:&lt;/p&gt;
&lt;p&gt;I changed the reference to "VisitedEntryAction" to be a simple System.Action, so...:&lt;/p&gt;
&lt;p&gt;Action va = delegate (CFItem item)&lt;br/&gt;
            {&lt;br/&gt;
                CFi.Add(item);&lt;br/&gt;
            };&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;        cf.RootStorage.VisitEntries(va, true);
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This runs correctly and loads the list with CFItems. I was able to successfully load Storage and Streams for each Storage with the same technique.This completes the retrieval phase of my compound file access. I notice, in passing, that the Directory property is not accessible via OpenMCDF and this would give the path to each stream... I can get this data running 7-zip with an -l switch and re-directing output to a text file... Primitive, but it works.&lt;/p&gt;
&lt;p&gt;The next phase involves accessing and changing the data in selected streams, then replacing the modified streams in the compound file.&lt;/p&gt;
&lt;p&gt;I'll report success or problems to this thread.&lt;/p&gt;
&lt;p&gt;It strikes me as a shame that no comment or help has been forthcoming by the originator of this software (or anyone else...) because it is obvious that a huge amount of very valuable work has gone into OpenMCDF. Perhaps the demand is low and, over years, the novelty has worn off... &lt;/p&gt;
&lt;p&gt;Pete.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Determine number of inline images in a binary Word documenmt</title><link href="https://sourceforge.net/p/openmcdf/discussion/1199792/thread/54abda45/?limit=25#f638" rel="alternate"/><published>2017-12-23T00:44:41.283000Z</published><updated>2017-12-23T00:44:41.283000Z</updated><author><name>Pete Dashwood</name><uri>https://sourceforge.net/u/petedashwood/</uri></author><id>https://sourceforge.net424161177707c84a5f5b6537cb791839fb2b42b8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;As far as I know, there is no actual count of images in the FIB. (But it is a complex variable block and I may have missed something...) I think your best bet would be to use the information here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://msdn.microsoft.com/en-us/library/office/hh965732" rel="nofollow"&gt;https://msdn.microsoft.com/en-us/library/office/hh965732&lt;/a&gt;(v=office.14).aspx&lt;/p&gt;
&lt;p&gt;...and detect each image, counting as you go.&lt;/p&gt;
&lt;p&gt;HTH,&lt;/p&gt;
&lt;p&gt;Pete.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Example code causes fatal errors so it can't compile/buildon my system...</title><link href="https://sourceforge.net/p/openmcdf/discussion/1199792/thread/f071271c/?limit=25#860c" rel="alternate"/><published>2017-12-22T01:46:40.518000Z</published><updated>2017-12-22T01:46:40.518000Z</updated><author><name>Pete Dashwood</name><uri>https://sourceforge.net/u/petedashwood/</uri></author><id>https://sourceforge.net63c01707412109927f0e75137d4ee74370daaba3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am very new to OLE Structured Storage but I managed to download your OpenMCDF and install the package thru NuGet. (Into VS2015)&lt;/p&gt;
&lt;p&gt;What I need to do is pretty simple and falls into 3 steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open an existing OSS file (I'll call it "the archive") and get a list of the Storage and Streams it contains.&lt;/li&gt;
&lt;li&gt;Extract certain selected streams, Edit them. (They are actually plain text files...)&lt;/li&gt;
&lt;li&gt;Replace the edited streams in the archive. (Or, if this is too dificult, create a new archive and write all of the storage and streams across to it, replacing the edited streams with the new edited versions.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So, I spent a fair bit of time reading the Help file (after I managed to get it opened properly, see elsewhere in this forum) But it doesn't make a lot of sense to me because it lacks a step-by-step example. The actual documentation of methods and properites is excellent, but it doesn't show me where I would use these things. For example: the Red and Black stuff... what is that all about?&lt;/p&gt;
&lt;p&gt;I expected to be able to open the archive and do something like the "GetAllNamedEntries" method, but it won't accept a wild card to get everything, so I searched further...&lt;/p&gt;
&lt;p&gt;I found this (under the CFItems Class):&lt;/p&gt;
&lt;p&gt;CompoundFile cf = new CompoundFile(STORAGE_NAME);&lt;/p&gt;
&lt;p&gt;FileStream output = new FileStream("LogEntries.txt", FileMode.Create);&lt;br/&gt;
TextWriter tw = new StreamWriter(output);&lt;/p&gt;
&lt;p&gt;// CFItem represents both storage and stream items&lt;br/&gt;
VisitedEntryAction va = delegate(CFItem item)&lt;br/&gt;
{&lt;br/&gt;
     tw.WriteLine(item.Name);&lt;br/&gt;
};&lt;/p&gt;
&lt;p&gt;cf.RootStorage.VisitEntries(va, true);&lt;/p&gt;
&lt;p&gt;tw.Close();&lt;/p&gt;
&lt;p&gt;I don't want the results written to the log, so I modified the above as:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;            CompoundFile cf = new CompoundFile(zipFileToRead);
            List&amp;lt;CFItem&amp;gt; CFi = new List&amp;lt;CFItem&amp;gt;();
            // CFItem represents both storage and stream items
            VisitedEntryAction va = delegate (CFItem item)
            {
                CFi.Add(item);
            };

            cf.RootStorage.VisitEntries(va, true);

            foreach (CFItem it in CFi)
            {
                // TODO:

            }
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In BOTH CASES the line:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;            cf.RootStorage.VisitEntries(va, true);
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;... throws an error on the "va" reference, as:&lt;/p&gt;
&lt;p&gt;Error   CS1503  Argument 1: cannot convert from 'OpenMcdf.VisitedEntryAction' to 'System.Action&amp;lt;OpenMcdf.CFItem&amp;gt;'   &lt;/p&gt;
&lt;p&gt;I tried everything I can think of to make this right but I don't really understand the "VisitedEntryAction" ... and I have never encountered System.Action in C# before.&lt;/p&gt;
&lt;p&gt;I'd appreciate any guidance, please.&lt;/p&gt;
&lt;p&gt;Pete.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Help file does not load properly</title><link href="https://sourceforge.net/p/openmcdf/discussion/1199792/thread/e167d21c/?limit=25#dbf2" rel="alternate"/><published>2017-12-22T00:12:46.113000Z</published><updated>2017-12-22T00:12:46.113000Z</updated><author><name>Pete Dashwood</name><uri>https://sourceforge.net/u/petedashwood/</uri></author><id>https://sourceforge.net3d4364c6c9cd486dda697dcc98a2947a8a6e8215</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I had exactly the same problem. Right Clicking Properties did not show any "unblock" button. Solved it by Extracting the OpenMCDF download Zip into a new directory, and clicking on the extracted .chm file in the new directory.&lt;/p&gt;
&lt;p&gt;Pete.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Determine number of inline images in a binary Word documenmt</title><link href="https://sourceforge.net/p/openmcdf/discussion/1199792/thread/54abda45/?limit=25#827a" rel="alternate"/><published>2017-12-17T15:31:31.830000Z</published><updated>2017-12-17T15:31:31.830000Z</updated><author><name>Joey Picinich</name><uri>https://sourceforge.net/u/pic-az/</uri></author><id>https://sourceforge.net197589ad177fadf65cd1618e26c0c0761317508c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;How can I determine the number of inline images there are in a binary Word document that is NOT an attachment? I have the FIB and see that it does contain images but that inlcudes attachment icon.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Detecting Formatting Such as Bold, Color</title><link href="https://sourceforge.net/p/openmcdf/discussion/1199791/thread/1495bd91/?limit=25#d745" rel="alternate"/><published>2017-10-12T14:54:55.371000Z</published><updated>2017-10-12T14:54:55.371000Z</updated><author><name>Eric Gitonga Njue</name><uri>https://sourceforge.net/u/erick1435/</uri></author><id>https://sourceforge.netea2da959e2093008d52a954265ba73fd552119d8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;How can one   get   the formatting used on a text or line&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Extracting old doc and xls files</title><link href="https://sourceforge.net/p/openmcdf/discussion/1199792/thread/fe34a4d3/" rel="alternate"/><published>2016-04-25T09:15:24.636000Z</published><updated>2016-04-25T09:15:24.636000Z</updated><author><name>Adrian Parker</name><uri>https://sourceforge.net/u/adrianparker96/</uri></author><id>https://sourceforge.netf99cde4f242c602a04e4f482315135850d8f75fc</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Where can I find out the structure of the containers for types 'Microsoft Excel Worksheet' and 'Microsoft Word Document'?&lt;/p&gt;
&lt;p&gt;For instance for the XLS document, I tried the following..&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;                    CFST = CF.RootStorage.GetStream("Workbook")
                    OutBytes = CFST.GetData()
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;But when I save that to file, it's not a proper XLS file as it failes to load in Excel.  The same happens for the doc file.&lt;/p&gt;
&lt;p&gt;The above works ok for type "adobe acrobat document" using the CONTENTS stream.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Compacting and cloning streams</title><link href="https://sourceforge.net/p/openmcdf/discussion/1199792/thread/e43f0217/" rel="alternate"/><published>2016-04-20T08:04:49.659000Z</published><updated>2016-04-20T08:04:49.659000Z</updated><author><name>David Saez</name><uri>https://sourceforge.net/u/sparc/</uri></author><id>https://sourceforge.net24c306a8ba09fa36efc12e46f6d4c4f75846cd7b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;We have real ver. 4 format files, any chance to get the shrink method to work with this files ?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>