Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2025, 08:37 AM
BillH45 BillH45 is offline How to include formatted code in a post? Windows 11 How to include formatted code in a post? Office 2021
Novice
How to include formatted code in a post?
 
Join Date: Oct 2025
Location: Edinburgh, Scotland
Posts: 6
BillH45 is on a distinguished road
Default How to include formatted code in a post?

I'm new to this forum and I want to include some code in a post but for the life of me I can't find out how to make it come out formatted as code rather than just text in the post. There's nothing I can find in the FAQs that covers this.



I've tried [/code] and [code/] and the three backticks before and after which seem to be recommended on other forums but they don't work here (at least not on a Preview).

Can someone enlighten me please?

Bill
Reply With Quote
  #2  
Old 10-19-2025, 09:08 AM
Charles Kenyon Charles Kenyon is offline How to include formatted code in a post? Windows 11 How to include formatted code in a post? Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,547
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

First, the simplest way is to use the # button to wrap code tags around a selection.
The beginning tag does not have a / slash before the term, only the closing tag.
You can get even more formatting controls by using the "Go Advanced" button at the bottom-right of the posting window.


The above assumes that your question is about putting your code in a post here, not in a Word document.
In a Word document, I use a custom paragraph style named Code.
Body Text is my base style. Use Body Text Style Instead of Normal Style
Reply With Quote
  #3  
Old 10-19-2025, 02:25 PM
macropod's Avatar
macropod macropod is offline How to include formatted code in a post? Windows 10 How to include formatted code in a post? Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,489
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by BillH45 View Post
I've tried [/code] and [code/] and the three backticks before and after which seem to be recommended on other forums but they don't work here (at least not on a Preview).
The Code tags both here and at multiple other forums are
HTML Code:
[CODE][/CODE]
or
HTML Code:
[code][/code]
not [/code][code/]. You can insert them via the # symbol on the posting menu.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 10-21-2025, 04:21 AM
BillH45 BillH45 is offline How to include formatted code in a post? Windows 11 How to include formatted code in a post? Office 2021
Novice
How to include formatted code in a post?
 
Join Date: Oct 2025
Location: Edinburgh, Scotland
Posts: 6
BillH45 is on a distinguished road
Default

Thank you both.

[code ] [/code ] works and thanks for pointing out the '#' on the menu to add the tags automatically.

Unless I'm blind, there is no "Go Advanced" button at the bottom-right of my posting window. All there is in the window, apart from the Smilies selection table on the right, is a selection of icons to mark the post and under that there are the 'Submit Reply' and Preview Post' buttons. A separate section beneath those gives Additional Options, none of which imply advanced editing options.

No matter, I'm good go now, thanks.
Reply With Quote
  #5  
Old 10-21-2025, 04:58 AM
macropod's Avatar
macropod macropod is offline How to include formatted code in a post? Windows 10 How to include formatted code in a post? Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,489
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Below the default screen:
Attached Images
File Type: png PostScrn.png (27.4 KB, 9 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 10-22-2025, 03:10 AM
BillH45 BillH45 is offline How to include formatted code in a post? Windows 11 How to include formatted code in a post? Office 2021
Novice
How to include formatted code in a post?
 
Join Date: Oct 2025
Location: Edinburgh, Scotland
Posts: 6
BillH45 is on a distinguished road
Default

OK, I get it now. I'm shown a different screen when creating a new thread (as I'm attempting) but when replying to one it gives what you have shown with the Go Advanced button. Hitting that displays the 'new thread' screen with more editing options.

Sorry to bother you with such trivia. I'm sure you have better things to do.
Reply With Quote
  #7  
Old 10-22-2025, 03:44 AM
macropod's Avatar
macropod macropod is offline How to include formatted code in a post? Windows 10 How to include formatted code in a post? Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,489
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

What you see when starting a new thread is the advanced screen. It's only when replying that the simple screen is shown.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to include formatted code in a post? VBA include Character Code 002D Dash-Minus Shelley Lou Word VBA 7 07-03-2024 08:18 AM
How to include formatted code in a post? Post code Snippets Bikram Word VBA 2 12-08-2021 10:25 PM
How to include formatted code in a post? Help to include header and footer in string search code which i already have. branko Word VBA 1 03-28-2017 11:50 PM
Macro to keep formatted form fields after mail merge or replace text with formatted form fields jer85 Word VBA 2 04-05-2015 10:00 PM
Misplaced Post Code Doc John Word 0 02-05-2009 05:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft