I want my program to control spreadsheet footer contents.
In particular I want to be able to set the font size and use PageNumber and 
PageCount fields.
If I use the scalc GUI to set the footer contents and then interrogate the 
contents programatically, I see text values such as

     &8This text is set to fontsize 8
and
     Page &P of &N

Clearly the & character introduces a code that controls font size or is a 
placeholder for a field such as the page number.

However, if I set the content of footer text to strings with this format 
there is no interpretation of the & codes and I see the exact text that I 
set into the footer, e.g. the footer displays as 'Page &P of &N' instead of 
'Page 1 of 3'.

On studying the Developers Guide I wondered if I needed to create a 
'com.sun.star.text.textfield.PageNumber' object and insert it into the 
footer text.
However, I can find no way to create the pagenumber object.
Code such as
          Dim field As Object = 
doc.createInstance("com.sun.star.text.textfield.PageNumber")
results in a  'com.sun.star.lang.ServiceNotRegisteredException:'

Please can someone give me a clue how to proceed? 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to