Author Archives: Miklovan

Funny: How the new powerful cryptography implemented in Word 2007 turns it into a perfect tool for document password removal.

Today I will talk a bit about Word 2007, its new document format DOCX, and its not very clever implementation of an old MS Word feature called Document Protection.

So what is document protection essentially? Called by Review | Protect Documents | Restrict Formatting and Editing in MS Word 2007, it allows you to set different types of protection, including Readonly, Tracked changes, Comments and Filling in forms. Very convenient to prevent undesired changes to the … Continue Reading

Posted in Vladimir Averkin |

How to Create a Wrapper to Assist in calling Aspose.Words Methods from Classic ASP.

As you probably know, it is quite possible to use Aspose.Words in classic ASP applications. Aspose.Words assembly gets registered for COM Interop during setup and it is then possible to use it from classic ASP.

The following articles provide an interesting example of how to create Aspose.Words powered ASP application without even having Visual Studio installed.

However, recently one of our customers reported a problem … Continue Reading

Posted in Aspose.Words Product Family |

How to insert image, rescaling it to fit the container’s size

Sometimes, there is a need to rescale the images so that they could comply with the overall design of the document or simply fit to page size.

The best way to do it is creating a container having the desired size and putting it to the document. The two possible candidates for containers are table cell or textbox. And the best way to mark up the place for image insertion is an image merge field (the filed that has … Continue Reading

Posted in Aspose.Words Product Family | Tagged , , , , ,

Extract Word Document Content Separated by Page Breaks using C#

In Aspose.Words, it is pretty easy to extract document content separated by section breaks, as this content is effectively put in separate Section nodes in Aspose.Words object model.

But what if we need to extract content separated by page breaks?

Here is a small and relatively simple code that can help you in solving this task:

Example [C#]

/// <summary>
/// Extracts pages from the specified document as a number of separate documents.
/// The pages must be separated with page breaks.
/// 
Continue Reading
Posted in Aspose.Words Product Family |

Remove Bookmarks in Word Document using C#

What to do if you need to remove bookmark and its entire content from the document altogether. The only method existing in API for that is setting Bookmark.Text to an empty string. But that will work only for the simplest of bookmarks. For bookmark spanning multiple nodes with mixed content, like paragraph, tables, it will fail with a dreaded “Start and end node should have the same grand parent” exception. It will also fail when bookmark spans several sections and … Continue Reading

Posted in Aspose.Words Product Family |

Workaround for form field text loose formatting when updated from code.

There is a known issue of loss of formatting when setting form field text input value using Result property or SetTextInputValue method. For example, you have formatted your text form field as bold and it comes up as normal text when updated. For a workaround you can use the following wrapper method instead of using SetTextInputValue method directly:

Example

[C#]

private void SetFormFieldText(FormField formField, object value)
{
        if ((value == null) || (value is string) && ((string)value == “”))
        {
                
Continue Reading
Posted in Aspose.Words Product Family |

WordML Export is now supported in Aspose.Words

Hello Everybody,

That is my first entry in this blog, so let me introduce myself. My name is Vladimir Averkin, I am a development and support engineer in Aspose Auckland team. Besides providing all kinds of technical support for Aspose.Words users at the forums my primary responsibility is the development of XML-related features of Aspose.Words.

Today I would like to introduce the first major result of my development efforts – brand new Aspose.Words DOC to WordML conversion capability.

Some history … Continue Reading

Posted in Vladimir Averkin |