Free Support Forum - aspose.com

Questions about the demo

I’m supposed to be testing the classic asp, but that’s not included as part of the demo, so I’m just testing with the .net demo code.
I need to test how long it would take to convert 400 pages on the fly, but it only creates 9 pages. How can I really know how long it’s going to take before we commit to buying the product.
Would the classic asp component be comparable to the .net regarding the time it takes for the creation of the 400 pages?
Also, when are you expecting to come up with a conversion to mobi.

thanks.

Hi

Thanks for your inquiry. If you want to test Aspose.Words for without the evaluation version limitations, you can request a 30-day Temporary License. Please refer to

http://www.aspose.com/corporate/purchase/faqs/temporary-license.aspx

Please follow the link to learn how you can use Aspose.Words in classic ASP:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/use-aspose-words-for-net-via-com-interop.html

Unfortunately, currently there is no estimate regarding this format yet. We will let you know once this format is supported.

Best regards.

Thanks for the tip. I got my temporary license and was able to build the 400 pages using .net. That was pretty fast.

Since we will be working on classic asp. I need to use the setfontsFolder property of the FontSettings class as well as the HTMLSaveOptions class.
how do I access those from classic asp? Any documentation on classic asp?

thanks!!

Hi Ursula,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. I think it would be easier just create a simple COM wrapper. In this case, you will be able to move all code, where you use Aspose.Words into this wrapper (DLL) and use native .NET (C# or VB) to write the code.

Then you can just call methods of your wrapper to generate/process documents. Here is simple example how you can use Aspose.Words via COM wrapper. This example shows how to set font color. To achieve this follow the instructions:

1. Open Visual Studio and create “Class Library” project.

2. Create method, which accepts two parameters (DocumentBuilder and color name.) Here is source code of the wrapper:

using System.Drawing;

using Aspose.Words;

namespace AsposeComWrapper

{

public class Methods

{

public void SetFontColor(object builder, object colorCode)

{

DocumentBuilder b = (DocumentBuilder) builder;

b.Font.Color = Color.FromName(colorCode.ToString());

}

}

}

3. Now, you should make your class library signed and visible for COM.

4. After building the project, you should register the DLL using the following command:

regasm /codebase AsposeComWrapper.dll

5. Once your helper DLL is registered, you can use it to set color. Here is sample code:

Dim lic

Set lic = CreateObject("Aspose.Words.License")

lic.SetLicense("C:\Temp\Aspose.Words.lic")

' Open document

Dim doc

Set doc = CreateObject("Aspose.Words.Document")

' Create DocumentBuilder.

Dim builder

Set builder = CreateObject("Aspose.Words.DocumentBuilder")

builder.Document = doc

dim helper

Set helper = CreateObject("AsposeComWrapper.Methods")

helper.SetFontColor builder, "Red"

builder.Write("Hello world!!!")

' Save output document

doc.Save("C:\Temp\out.doc")

Hope this helps.

Best regards.

Hi Alexey,

I just tried your solution and I’m getting AsposeComWrapper (0x80004002)
Unable to cast COM object of type ‘System.__ComObject’ to class type ‘Aspose.Words.DocumentBuilder’. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.

I really don’t know much about creating com objects.

Any help would be greatly appreciated.

Ursula.

Hi Ursula,

Thanks for your request. Could you please attach your wrapper(entire project) and code where you call it here? I will check the issue and provide you more information.

Best regards,

Hi Alexey,

I’m attaching the whole .net project and the asp file.

I pretty much copy the code that you provided just to test it out.

thanks.

Actually one of the method we will need to use is
MailMerge.Execute

How can I use that in asp?

thanks.

Ursula.


Hi Ursula,

Thanks for your request.

1. Your COM wrapper looks fine. Unfortunately, I do not have any idea why it does not work on your side. Have you tried specifying .NET 2.0 as target framework?

2. In COM you cannot use Execute method. You can only use ExecuteADO and ExecuteWithRegionsADO:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/aspose.words.reporting.mailmerge.executeado.html

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/aspose.words.reporting.mailmerge.executewithregionsado.html

Best regards,

Hi Alexey,

I tried changing the target to .net 2 but I had the same results. I’m not going to use exactly that function so I’m ok for now. I tried using the fonts location function and that worked fine.

Also the executeADO worked great.

thanks.

Ursula

Hi Ursula,

It is perfect that you managed to achieve what you need. Please let us know if you need more assistance, we are always glad to help you.

Best regards,