Simple set-up for testing

Hi, i'm afraid I have to use that dreaded frase 'i'm new to .net'...

I've installed .Net & aspose.word, and have even managed to get the letter
demo to work within my own site.

Now i'm trying to create my first full example.
I would like to call a single page and have it render a word document, so i have tried :

<%

Imports Aspose.Word

Dim word As word = New word()
Dim doc As Document = word.Open("C:\Intranet2\Web\Documents\PersonalizedLetter.doc")


doc.Save( _
"PersonalizedLetter.doc", _
SaveFormat.FormatDocument,SaveType.OpenInBrowser,Me.Response)

%>

As i'm sure all 'experts' have realised, this is NOT the way to do an import.

Could someone please be very kind, and post a simple example of what i'll have to do get this type of simple page render to work.

TIA

What development environment do you use? Do you use MS Visual Studio .NET?

In Visual Studo .NET you are working on what is called a Web Application project and there is References item in the Project Explorer. You just right click, Add References and select Aspose.Word.

I’m afrain I can’t help if you use other development tool.

What you’ve posted seems to be VB.NET code embedded into an .aspx file. This is the way ASP pages were built. This method is still available in ASP.NET, but it is not recommended and in fact I’ve never done it this way.

The proper way to do this is when the page is in the .aspx file and the code is separate in the .aspx.vb file. There is no complex magic, you just add a new page in Visual Studio .NET and it creates both files and you type your code and design your page.

Romank,

I’m actually finishing an intranet developed in simple ASP.
I had intented using contenttype streams to output html documents to word, but time is short, and I believe it will be quicker and easier to develope my documents with aspose.word.

I use a simple text editor to develop.

I don’t intend to learn .NET more than I need to use the aspose.word component and finish off this project. I’ll get into .NET more in the future (after I have a rest).

Quite simply the intranet records text documents, which i have to output first in word and later in a second stage in pdf.

I intend to have a simple link to call an aspx page that will have all the code necessary to generate and return a word document. As if I was working in ASP and not in ASP.NET.

I’ve learnt to import the namespace, and have managed to form a simle word document. Now, if I can prove to myself that I can insert the texts as I need them all will be well

So you have it working? Let me know if you still have questions.