Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #15  
Old 04-02-2018, 04:52 AM
matelot2 matelot2 is offline can I get bbcodes to format in a page? Windows 7 64bit can I get bbcodes to format in a page? Office 2003
Novice
can I get bbcodes to format in a page?
 
Join Date: Jul 2017
Posts: 13
matelot2 is on a distinguished road
Default

Quote:
then you'd do better to use something like:
Code:
.Text = "\[color=0040FF\](*)\[/color\]"
.Replacement.Font.Color = &H40FF
I can't get the visual basic to accept &H40FF or any combination I have tried?

I put the numbers in back to front i.e. &H40FF becomes &HFF0400 and it works? I now get blue
If you scroll down https://htmlcolorcodes.com/ about the middle you get

# XX XX XX
by putting them into my macro back to front the colours show up.
It deletes the leading '0's so I am going to keep playing and see what I find.

It accepts &HFF for red (i.e. 0000FF with the leading 0s' removed)
It accepts &HFF0000 for blue
but it won't accept &HFF00 for green (even if I put &H00FF00)
It accepts &H04FF00 for a paler green? (that it changes to &H4FF00) and &H01FF00 (that it changes to &H1FF00)
&H018000 is a better green. changed to &H18000.

I am also looking at size
I opened up your program so the different instructions are in blocks of 4 like this

.Replacement.ClearFormatting
.Text = "\[b\](*)\[/b\]"
.Replacement.Font.Bold = True
.Execute Replace:=wdReplaceAll

.Replacement.ClearFormatting
.Text = "\(*)\" (size code removed to stop it changing size)
.Replacement.Font.Size = &H16
.Execute Replace:=wdReplaceAll

It looks as if different forums use different ways of changing size,
this one uses
HTML Code:
[SIZE="5"][/SIZE]
where the one I am doing all this on uses
HTML Code:
[size=150][/size]
** they are both similar. I can use size=150 here and it works. If I hit the 'sizes' box above it gives me "5".
What do you think is the word equivalent of this?
I tried &H16 as above .Replacement.Font.Size = &H16
but the macro crashes with that?

Last edited by matelot2; 04-02-2018 at 03:08 PM.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
APA format without cover page or references? SoMany Word 0 03-02-2018 10:36 AM
Running Head AND Page Number on First Page of Document (for APA Format) with Word 2003 DBinSJ Word 3 11-23-2016 11:52 AM
word page format bakhtawar12 Word 1 01-22-2015 07:08 PM
can I get bbcodes to format in a page? Changing page format in document by page fiedlerw01 Word 1 10-23-2012 04:10 AM
Web page format Microsoftenquirer1000 Word 1 10-13-2012 06:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:57 AM.


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