cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Report Templates (MS Word)

Arunas
Trusted Contributor

Dear Community members //

 

We created a new RTF document  and updated the Descriptors . 

Questions is How to update the data  into the RTF document through Macro during document generation . pls refer the attached image .// It can be possible by creating new document in the macro , but scenario is have to update the data in the created RTF document . 

 

RTF.PNG

 

 

It doesnt work with "sResult = Version" (**as described in the parameter description - rtf text to be inserted in the report (MS Word) during generation) 

 

 

Any information would be appreciated !

3 Replies

Arunas
Trusted Contributor

Is the same format for Excel extraction also ? Cannot create a excel with this function on the web front end ,

Set xls = createobject("Excel.Application")

 

Script error "Error(0x800a01a8) : Object required: 'createobject(...)'" at Line 22 :
Excel_extract_Handbook.Macro : Microsoft VBScript runtime error 

 

thank you very much

Arunas
Trusted Contributor

hello imrankhatyan, // Thank you very much  ! It works .

imrankhatyan
Trusted Contributor

Ok you must return an RTF text to be presented in the document for example open wordpad put the data inside and save it as RTF, then open that document with notepad,  you will get something like

 

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22 versionNo\par
}

 

Just put return that in result

 

result = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}" & "{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22" & version.getProp("Short Name") & "\par }"

 

on the other hand you can also use mega's own function htmltortf.