# Header Footer

> Control slide headers and footers with Aspose.Slides for C++: add dates, slide numbers, and custom text in PPT, PPTX, and ODP with C++ examples.

Source: https://docs.aspose.com/slides/cpp/examples/elements/header-footer/
Updated: 2026-08-05


This article demonstrates how to add footers and update date and time placeholders using **Aspose.Slides for C++**.

## **Add a Footer**

Add text to the footer area of a slide and make it visible.

```cpp
#include <DOM/ISlide.h>
#include <DOM/ISlideHeaderFooterManager.h>
#include <DOM/Presentation.h>
using namespace Aspose::Slides;
using namespace System;

static void AddHeaderFooter()
{
    auto presentation = MakeObject<Presentation>();
    auto slide = presentation->get_Slide(0);

    slide->get_HeaderFooterManager()->SetFooterText(u"My footer");
    slide->get_HeaderFooterManager()->SetFooterVisibility(true);

    presentation->Dispose();
}
```

## **Update Date and Time**

Modify the date and time placeholder on a slide.

```cpp
#include <DOM/ISlide.h>
#include <DOM/ISlideHeaderFooterManager.h>
#include <DOM/Presentation.h>
using namespace Aspose::Slides;
using namespace System;

static void UpdateDateTime()
{
    auto presentation = MakeObject<Presentation>();
    auto slide = presentation->get_Slide(0);

    slide->get_HeaderFooterManager()->SetDateTimeText(u"01/01/2024");
    slide->get_HeaderFooterManager()->SetDateTimeVisibility(true);

    presentation->Dispose();
}
```



## Related articles

- [Manage Presentation Headers and Footers in C++](https://docs.aspose.com/slides/cpp/presentation-header-and-footer/)
- [Apply or Change Slide Layouts in C++](https://docs.aspose.com/slides/cpp/slide-layout/)