How to set the footer in a Word DOCX document in C# .NET Framework

Cloudmersive
1 min readFeb 6, 2020

--

Today’s API tutorial covers how to insert a footer into a Microsoft Word document in just a few short minutes. Let’s begin.

To kick things off, let’s install our API client. Easy enough: just run this command in Package Manager’s console and NuGet will do the rest.

Install-Package Cloudmersive.APIClient.NET.DocumentAndDataConvert -Version 2.2.0

With that out of the way, we can now call our EditDocumentDocxSetFooter function.

using System;using System.Diagnostics;using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Api;using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Client;using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Model;namespace Example{public class EditDocumentDocxSetFooterExample{public void main(){// Configure API key authorization: ApikeyConfiguration.Default.AddApiKey("Apikey", "YOUR_API_KEY");// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed// Configuration.Default.AddApiKeyPrefix("Apikey", "Bearer");var apiInstance = new EditDocumentApi();var reqConfig = new DocxSetFooterRequest(); // DocxSetFooterRequest | Document input requesttry{// Set the footer in a Word DOCX documentDocxSetFooterResponse result = apiInstance.EditDocumentDocxSetFooter(reqConfig);Debug.WriteLine(result);}catch (Exception e){Debug.Print("Exception when calling EditDocumentApi.EditDocumentDocxSetFooter: " + e.Message );}}}}

Done! You should know that this is just one of many API functions we have that can edit documents in different ways. Be sure to check out our documentation section for more like this.

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

No responses yet