Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Further Question - VB Code to change font size of complete HTML Message Body

Status
Not open for further replies.

Raynepau

Technical User
Dec 30, 2010
33
GB
Xwb

I know you helped me before but I am now tring to set the font size for the HTML Body but cannot seem to find the correct approach

If you or anyone else could help again that would be great

Thanks
 
My initial guess is that you're going to need to so something like:

Replace(MyTextSelection,"<font=OldFont","<font=NewFont")

I realize there is more to it than that, but basically, to make the font changes from within VBA (assuming that, since you're posting in the MS Office forum - and with that said, it should really be posted in forum707 for MS Office VBA, or if it's really for VB, it should be posted in one of the VB Specific Forums), then the simplest method seems to be (to me) to use the Replace function.

As far as how you tell VBA to read the html file, well, I don't think we yet know enough about your file to go that far. I know you can tell VBA to read a text file, and write to a text file, it is possible in that regard.

However, do make sure - do you want to solve for this using VB (what version - 5,6,.net) or VBA (and then what version of Office)?

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top