In the Logitech Gaming Software, simply click the down arrow next to the button you want and choose "Edit Command".
You can also click "Scan for new games" under "Profiles" (should be a big picture of mouse on screen), select a game, then I assume modifying any buttons is game or application specific.
About 8% of the games I own had a profile show up.
So you click on the ICON for the game at the top to choose the game, but beyond that I HAVE NEVER USED THIS.
Also,
I believe you can click the PLUS sign to create a new profile by browsing to the EXE file of that program. Let's say it's MS WORD, you might be able to add that then change a button to do whatever.