Try our conversational search powered by Generative AI!

Accessing page properties from office publish scripts

Vote:
 
We need to add some logic to the EPiServer.Word.wsc script that is run when a user published from Word to EPiServer. I want two different things to happen depending on the value of one of the properties on the page. The only object that is sent to the Convert function is oConfig. But I cannot find any documentation on this object (type, methods, properties etc). I want to do something like this... If oConfig.Properties("ConvertToPdf") != null Then 'Convert to PDF Else 'Convert to HTML End if ..where ConvertToPdf is a property on the page that the user sets when publishing from Word. For various reasons I do not want to create different page types in EPiServer for each of these configuration options (will be many).
#12331
Aug 16, 2005 15:01
Vote:
 
I agree that this would be a nice feature, and we have actual given the idea of making pageproperties generically available to the convertscript some thoughts, but it never made it into the current release. We will probably add this functionality in upcoming releases. The Config object passed to the Convert function has the following properties: PageName FilePath UploadFolder IsDocumentPageType SelectionStart SelectionEnd PageName, FilePath and UploadFolder are rather selfexplanained, but IsDocumentPageType, SelectionStart and SelectionEnd may need a comment: IsDocumentPageType is a boolean that when true causes the (unaltered) original document file to be uploaded along with any converted data. This boolean is set through the pagetype property named "IsDocumentPageType". SelectionStart/SelectionEnd are integer values specifying the start/end of any selected text within the document if a partial convert is to be done. These values are set internally by the Officeplugin. Best regards, Johan Olofsson Developer EP Research, r.ep.se
#14079
Aug 17, 2005 13:54
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.