FillIN in .net with merge fields

Hello dear,
I have license version of aspose. I am working on FillIN- Field for word merge document. Can you please suggest how to use that in our word file or .net code.
I have done the code with access but I want to use in web … my fill code is { FILLIN "Recording date" \* MERGEFORMAT } but it isn 't working
please help me

This message was posted using Aspose.Live 2 Forum

Hi

Thanks for your request. Could you please attach sample document here for testing and provide me your code? I will check the issue and provide you more information.
Best regards.

Hello
Thanks for your quick reply…

I am sending you my file also the code which isn’t completed just summary of that.
please find attachment for document template

Dim doc As Document = New Document()
doc = New Document(AppDomain.CurrentDomain.BaseDirectory & wordMergeDocumentViews(ijk).FilePath.Trim() & "\" & wordMergeDocumentViews(ijk).FileName)

doc.MailMerge.Execute(dt)

doc.IsTemplate = True
doc.Document.IsTemplate = True
wmh.SaveDocument(doc)

Hi

Thank you for additional information. Templates should have .DOT extension. Please try using the following code:

// Open document.
Document doc = new Document(@"Test001\Reconveyance.doc");
// Save output document.
doc.IsTemplate = true;
doc.Save(@"Test001\out.dot");

Hope this helps.
Best regards.

Thanks for your reply. I appreciates it.

I want that with response can you let us know how can I do that?

doc.Save(@"Test001\out..dot", SaveFormat.Doc, SaveType.OpenInWord, System.Web.HttpContext.Current.Response)

I tried with it but it isn’t working.

Hi

Thanks for your request. The following code works fine on my side:

Document doc = new Document(@"C:\Temp\in.doc");
doc.IsTemplate = true;
doc.Save("out.dot", SaveFormat.Doc, SaveType.OpenInApplication, Response);

Best regards.

I have only following options

SaveType.OpenInBrowser
SaveType.OpenInWord

Hi

Thanks for your request. SaveType.OpenInWord = SaveType.OpenInApplication. This was changed in one of the latest releases because currently we also have an option to save documents in PDF and XPS formats. And it is confusing when you specify OpenInWord option for PDF or XPS, isn’t it.
Best regards.

I am using Aspose.Words version 13.4 and I couldn’t find IsTemplate property on the document object.

Can you tell me where that property is located in this API ?

Thanks,
Andrei

Hi Andrei,

Thanks for your inquiry. You can simply check the original load format to check whether the source document is template (please see Document.OriginalLoadFormat property). If the load format is Dot, Dotx, Dotm, FlatOpcTemplate, FlatOpcTemplateMacroEnabled or Ott then the document is template. Moreover, if you need to save document as a template, please save it in one of the above formats.

Best regards,