# Inserting a variable in the TEXT Macro

**URL:** <https://forums.unrealengine.com/t/inserting-a-variable-in-the-text-macro/371883>\
**Category:** UI\
**Tags:** Variable, text, unreal-engine, UE4, CPP, question\
**Created:** [September 28, 2016, 3:04pm UTC](https://forums.unrealengine.com/t/inserting-a-variable-in-the-text-macro/371883 "2016-09-28T15:04:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![PasteDog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PasteDog](https://forums.unrealengine.com/u/PasteDog)\
**Post date:** [September 28, 2016, 3:37pm UTC](https://forums.unrealengine.com/t/inserting-a-variable-in-the-text-macro/371883/2 "2016-09-28T15:37:42Z")

</div>

Hey A7E7,

You could try something like:

```
CreateDefaultSubobject<UStaticMesh>(*FString("Name" + FString::FromInt(i)));

```

Also take a look at this link for more information:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

Hope this helps 🙂  
Elias

---

_[View the full topic](https://forums.unrealengine.com/t/inserting-a-variable-in-the-text-macro/371883)._
