Hello,
For a client custom tables are made in NAV2009 SP1 (classic client).
Now a solution must be made to create letters in Word including custom fields.
The client must be able to generate the templates in Word himself. It would be nice letters can be generated and printed through a batch.
The following options are possible:
- Interaction template
Custom fields can't be used.
It can be programmed to use custom fields but only a maximum number of fields can be used.
- Style sheets
It can not be called through code behind a button.
It can not be used through a batch.
Does anyone have a flexibel solution?
Thanks in advance.
0
Answers
See attachment for this function (add it in codeunit 403)
It can be called like this:
//gAppLaunchMgt Codeunit Application Launch Management
//gPKRecRef RecordRef
gPKRecRef.GETTABLE( BaseRecordInStyleSheet);
gAppLaunchMgt.LaunchAppManual( gPKRecRef,
StyleSheetToUse, // somewhere the user has chosen this one, or set in setup record
ExportFormat::PDF, // or " ", DOC, HTML, TXT
PathToStoreFile,
{VAR} FileNameCreated);
This works in a 5.0SP1 environment on SQL with 3.70 functionality
Function looks like this:
I will look if it is possible in NAV2009SP1.
Who's going to process the url attribute you create? There's no code to do this in my version.
Checked NAVW16.00.01 (2009 SP1 R2) and NAVW15.00 (NAV 5.0 SP1).
|To-Increase|
Yes, you are correct. It creates a node in an empty XML Document. Maybe Remco isn't working with NAV anymore for this
1.
To test and start it.
2.
The new code.
3.
I have made MS-Word visible.
Has anybody fixed this?
Senior NAV Developer
Elbek & Vejrup