Archive for the 'OLE objects' Category

You should not use Insert Object menu to add JPEG picture files

Thursday, July 13th, 2006

This note is for those who know how to use the Insert Object menu to insert OLE objects in WhizFolders.

As a rule, you should not use the “Insert Object” menu to add JPEG picture files. Why? The JPEG pictures or files take enormous space as OLE objects. If you try that in any application like Wordpad or WhizFolders, it may appear to hang because it takes too much time to insert that object.

Instead, use the Insert Picture menu and WhizFolders allows you to reduce the JPEG size (by reducing the quality) that works much quicker and in many cases, you may not notice the difference in quality. You can also try Copy and Paste.

When I use Insert Picture menu to insert a bmp (bitmap) file, I just see an icon with file name, no picture. What is wrong?

Tuesday, July 4th, 2006

Update: The new version 6.3 soon to be released has features to detect and fix this problem that occurs due to some graphics other program in your registry.

WHY THIS PROBLEM OCCURS?

This means that the OLE stuff that is responsible for showing an embedded picture is broken on your system. WhizFolders needs a proper OLE server to show pictures. So does Wordpad. So you will see exactly the same problem in Wordpad. Please confirm that first.

Normally, the ole server that shows bmp pictures is Microsoft Paint. On some systems, it is Microsoft Photo Editor. There may be other graphics programs too that can act as ole servers, for example, PaintShop Pro 7 works well too. But the problem happens if an uninstall (or install) program of some graphic software breaks the registry links.

Here are some things you can try.

  1. You need to tweak the registry using REGEDIT utility. If you are not comfortable doing that, please follow on to step 2. Here are the steps to perform with RegEdit:

    (A) Click on Start–Run and type RegEdit to start it. (On Vista, the Start menu won’t have Run command. You can either customize it to add the Run command or type Run in the bottom search box and then select “Run” in the list above when it appears.)

    (B) Using Regedit, go to the key “HKEY_CLASSES_ROOT\.bmp”. Select .bmp key on the left as shown in the picture.RegEdit bmp key

    (C) On the right, see the value of Default. The value that you have there might give some idea of the program that caused the problem.

    (D) Caution: Before changing that value, export this registry key to some place (File menu) so that you can restore the current value later if needed. You must save as .REG file in export so that you can restore it. Do not save as .TXT file.

    (E) Now in the right pane, right-click on Modify to change the value of Default to: Paint.PictureRegEdit bmp key

    (F) Important: If this method fixes the problem, please DO NOT ask the program that had occupied this value earlier to associate itself with the .bmp files. Otherwise, you will get the same problem again.

  2. In most of the cases, one of the above steps should fix it. If it doesn’t, try reinstalling Microsoft Photo Editor (if you have it) or Microsoft Paint (see steps later). But note that if you are using some other program to edit the graphic files then you may have to reinstall that other program. In that case, try these reinstalls only if you are confident that you will be able to reinstall that other graphics program or its file associations if things go wrong with it.

    For reinstalling Microsoft Paint, go to Add Remove programs in Control Panel and then in Windows Components–Accessories and Tools–Details–Accessories–Details, do a uncheck on Paint and remove it. Then do it once more and put ON that option to reinstall it. Note that you may need your XP CD for this. On Vista, this procedure won’t work, and I don’t know the answer on how to reinstall Microsoft Paint. May be you can get it back from some disk image you saved by a tool like Acronis True Image.

  3. If none of the above fixes work, here is another thing to try. Click on Start–Run and type: regsvr32 ole32.dll. See if this fixes the problem.

If the problem still exists, it seems to be a case we haven’t encountered. In that case, please contact us. It would help if you send us the .REG file exported from the .BMP key that we mention above.

Addendum, here are some other points to understand regarding pictures, their display in Wordpad and WhizFolders and the programs that edit them:

How does the registry get disturbed as explained above? I will give you an example. Suppose you install a program GraphicXYZ on your computer and it asks you, do you always want to open this program to open the .BMP files? If you say yes, that program changes the registry so that .BMP files always open in that program. But if that program can not act as an OLE server, it breaks the picture display feature in Wordpad and WhizFolders.

So what is the solution? Don’t ask a program to set it up as opener but instead, use the right-click “Open With” menu in Windows Explorer to set up a program as an opener for the .bmp file type.

What program, other than Microsoft Paint, seems to work well both as an opener and also as an OLE server?

The first one is Microsoft Photo Editor, according to Microsoft documentation. Another one that I found that works well is PaintShop Pro version 7. I have not tested other versions. To use these programs as ole servers, simply ask them to set them up as openers for .bmp files and it should work. If you find some other program that works well, please let us know.

What if I want to edit the picture inserted in WhizFolders? Note that WhizFolders reduces the quality of a picture when inserting to reduce its byte-size to a value that it can manage. So if quality is important to you, it is always better to preserve your picture file outside if you plan on editing it. Then resinsert it in WhizFolders after editing as necessary.

Otherwise, if you double-click on the picture in the editor of WhizFolders, it opens for editing in Microsoft Paint or whatever is set up as the ole server in the registry. If you don’t want to use that program for editing pictures, you need to use copy and paste to edit the picture in your favorite graphics program and paste it back in your WhizFolder document to replace the original picture.

Inserting OLE objects

Sunday, June 25th, 2006

OLE (activex) is a great technology whereby a WhizFolders topic can show the contents of another type of document and can let you edit it from within WhizFolders. For example, you can put an Excel spreadsheet or a Word document in a topic. In order for this to work, the host application for that type of document must have an OLE server on the system. When you go to insert OLE objects, you would see a list of all kinds of objects you can insert.

Before I continue, some important points: You can either have objects that completely reside in your WhizFolder document or you can just have a link to an external file holding the object. Unless you know that the object is small, I would recommend you to always use a “linked” object. Otherwise, you might slow down WhizFolders considerably. I will explain how you create a linked object in the following discussion.

We will follow an example step by step.

  1. Suppose, you have an excel spreadsheet called “my account.xls” that you want to insert as an OLE object in a topic called “My account.”

  2. First decide whether you want to insert a complete copy of the spreadsheet or just a “linked” object. I always advise a “linked” object unless the object is very small. The advantage is that your xls file stays outside for you to manage or edit separately. At the same time, WhizFolders can always display the latest contents of this file.

  3. There are two ways, you can insert. Just drag and drop this file from Explorer to the Topic editor with Ctrl key pressed. Then the same dialog will appear that appears when you click on the menu “Insert Object” on the editor. So for existing files, it is quicker to use the drag and drop with Ctrl key method and for new objects, it is better to use Insert Object.

  4. On the dialog, select the file you want to insert (unless already filled in the drag and drop method) and select “Create from File.” Check the Link to create a linked object and click OK.

  5. That’s it. You will see that the topic now shows the spreadsheet! To edit the spreadsheet at any time, you just need to double-click on it or select “Microsoft excel spreadsheet Object–Edit” on the right-click menu. This menu changes description based on the object. Very neat!

  6. There is yet another magic up WhizFolders sleeve. If you are using a non-linked object, you can take advantage of in place editing. You can put ON an editor option “Use in place editing of OLE objects” in General Options. If you do that, for editing, the topic editor itself assumes the role of Excel application and starts looking like it with proper toolbars etc. But this feature is not available for Linked objects.

So understand OLE for once and start using it to your advantage. Only remember that you should not put large OLE objects as embedded objects and you will be ok.

Using OLE features

Sunday, June 25th, 2006

A new feature now offers the option of inserting an embedded object, rather than an external Jumpfile link. This is done by holding down the Ctrl key when dragging and dropping a file name on the topic editor. A dialog appears allowing you to select the OLE object options. I will describe this dialog in another post. But for the following discussion, assume that I selected “Create from file” and “Link” on the dialog. This way the file stays outside, available to others but its contents are shown by WhizFolders topic viewer or editor.

An OLE (Object Linking and Embedding) object is different from a jumpfile link, in that WhizFolder shows the actual content of the file directly within the topic viewing area. For example, when you drag an MS Word file name (e.g., myfile.doc) from the Explorer to a WhizFolders topic area, the default is to insert a link to that file. Now, holding the Ctrl key during the same operation inserts a representation of the actual content of “myfile.doc” directly into the topic. In this situation, you would have only WhizFolders open, and not the file’s application.

WhizFolders can hold an embedded link, such as this, in the topic area, allowing the underlying and actual file to be modified separately. For example, you might place an embedded object into a topic called “This Year’s Budget.” The object refers to an actual Excel spreadsheet called “thisyear.xls.” Using WhizFolders, you would click on the topic, and the viewing area would show the actual numbers in the spreadsheet. On the other hand, you (or someone else) can open Excel separately, without having WhizFolder open, and make changes to the spreadsheet. Those changes will then be automatically reflected in the WhizFolders topic, the next time you view the “This Year’s Budget” topic.

With this feature you can use WhizFolders as a consolidated “viewer” for many types of different files, gathering them together into an organized project. At the same time, you can create, edit, and format, additional topics within WhizFolders itself. One topic might be text you create directly, whereas another topic might contain a jump link to a Web site. Yet another topic might be a link to a file located on your hard drive (or on a network drive), while a different topic might use an embedded object to show an existing graphic, spreadsheet, document, or other file. Any change to the actual file outside of WhizFolders, is then automatically reflected with the updated information the next time you click on the topic within WhizFolders.

On the basis of a note sent by Craig Landes