Macro in template


In relation to your cuestion, in our aplication we work in this way: we open the document with a template which has a macro code with a tool bar that insert fields in the document created by the customer. This documents that the clients can create have no macro.<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>

The code is:<o:p></o:p>


If vgFichSO.ExisteArchivo(wTemplate) Then
Set wWord = CreateObject(“Word.Application”)
With wWord
.Documents.Open (wDocument)
.Visible = True
.Activedocument.AttachedTemplate = wTemplate
End With
Set wWord = Nothing
MsgBox “Template not Foun.”
End If

This allow that the fields insertion can be done from Word and not from our aplication. The documents viewfinder is Word, which also inserts the fields through the macro.<o:p></o:p>

In this way, we don′t need neither to create a viewfinder nor a code aplication for insert fields.<o:p></o:p>

If you know another way to do this, we wold be grateful if you tell it to us.<o:p></o:p>


Sorry have no good ideas on this one yet. I will sort out the merge fields for you first and then come back to this question.


We have already solved the subject of the template.
We have inserted it in folder STARTUP of Microsoft Office.
The user can insert the fields within documents easily.
In relation to fields of Word we have short time to solve it.
Call me as soon as you have something finished for we can fo a test.



MailMerge.UseNonMergeFields is available in Aspose.Word 2.1.10 to support your MACROBUTTON fields.