45
Views
6
Comments
Solved
[MSWordUtils] How to Implement Dynamic Numbering in Footer Section
mswordutils
Web icon
Forge component by Stuart Harris
Application Type
Traditional Web

How to implement Dunamic Page Numbering in the footer section.like Page 1 of 10.it will increase based on Page.

Solution

Hi Arkyadeep,

Ok certainly. Here are the steps:

  • On your computer, open Microsoft Word
  • Create a blank Microsoft Word document manually using Microsoft Word
  • Click Insert > Page Number and choose the type of page number you want (see below image)
  • Save the Microsoft Word document to a file, eg BlankWithPageNumbers.docx
  • In OutSystems Service Studio, add the Microsoft Word document to the Data tab under resources
  • Then in your OutSystems code use the MSWord_OpenDocument action to open the document
  • Write the rest of your code in OutSystems to insert content and generate the document
  • The Generated document will have page numbers

Does that answer your question?

If not, maybe I am not understanding what you mean by dynamic page numbers.

Please also remember I am supporting this plugin for free, in my own time.  So any help you can provide by further clarifying your needs will help us find the solution faster and would be very much appreciated.

I hope this helps you!

Kind regards,

Stuart

Hi Arkyadeep,

The best way to implement page numbering is to create a blank word document and insert page numbers using Microsoft Word, then store that word document somewhere, such as under resources.

Then in your code, open the Word document using the MSWord_OpenDocument action and insert your content.

Refer to the documentation for more information.

I hope this helps!

Kind regards,

Stuart

Hi Stuart

it is not clear.i am creating the document data dynamically.can u plz clarify how to achieve numbering in fotter section.

Solution

Hi Arkyadeep,

Ok certainly. Here are the steps:

  • On your computer, open Microsoft Word
  • Create a blank Microsoft Word document manually using Microsoft Word
  • Click Insert > Page Number and choose the type of page number you want (see below image)
  • Save the Microsoft Word document to a file, eg BlankWithPageNumbers.docx
  • In OutSystems Service Studio, add the Microsoft Word document to the Data tab under resources
  • Then in your OutSystems code use the MSWord_OpenDocument action to open the document
  • Write the rest of your code in OutSystems to insert content and generate the document
  • The Generated document will have page numbers

Does that answer your question?

If not, maybe I am not understanding what you mean by dynamic page numbers.

Please also remember I am supporting this plugin for free, in my own time.  So any help you can provide by further clarifying your needs will help us find the solution faster and would be very much appreciated.

I hope this helps you!

Kind regards,

Stuart

Thanks for your support.it is working properly.

Hi, using MsWordUtil_library , uploaded sample word doc with page number into data-> resources.
i am trying to do :In OutSystems Service Studio, added the Microsoft Word document to the Data tab under resources.
But in MSWord_OpenDocument is expecting a binary file and not a URL.Hence, i cannot open the word docx in binary format with MSWord_OpenDocument.
Could you enlighten me please?


mswordutil library.jpg
resources.jpg

Hi Larry,

Thanks for your question.

Note this is a separate issue, so would be better if you could submit a new issue instead of adding to this one.

To open a binary resource, in ServiceStudio if you open the expression editor for the value. Navigate down to Resources. Under your document you will find a "Content" item. This is the binary content of the resource.

Kind regards,

Stuart

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.