You can rearrange and organize program buttons on the taskbar, including pinned programs and running programs that aren’t pinned, so they appear in the order you prefer.
To rearrange the order of program buttons on the taskbar, drag a button from its current position to a different position on the taskbar. You can rearrange programs as often as you like.
All open files from the same program are always grouped together, even if you didn’t open them one after the other. This is so all previews for an open program can be viewed together at the same time.
If a program is pinned to the taskbar, the taskbar button stays in whatever position you dragged it to. If the program isn't pinned to the taskbar, the button stays in the position you dragged it to until the program is closed.
You can also rearrange icons that appear in the notification area, at the far right of the taskbar—just drag an icon to a different position. For more information, see Change how icons appear in the notification area.