Jump to content

writing text to file with a different font ?


 Share

Recommended Posts

does anyone know if you can use the filewriteline command and have a different font ??

ie i was to have headings in italics and other text bolded etc.

Text files don't store any formatting information, so FileWriteLine won't do you much good there.

You can accomplish this with Rich Text, MS Word, or HTML, to name a few.

Here's a basic HTML snippet:

Local $HTMLFile = @DesktopDir & "\Sample.html"
FileWriteLine($HTMLFile, "<p><b>Bolded Text</b></p>")
FileWriteLine($HTMLFile, "<p><i>Italicized Text</i></p>")

Also, check out Lazycat's RTF Plugin or search the forum for Office automation.

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Link to comment
Share on other sites

Text files don't store any formatting information, so FileWriteLine won't do you much good there.

You can accomplish this with Rich Text, MS Word, or HTML, to name a few.

Here's a basic HTML snippet:

Local $HTMLFile = @DesktopDir & "\Sample.html"
FileWriteLine($HTMLFile, "<p><b>Bolded Text</b></p>")
FileWriteLine($HTMLFile, "<p><i>Italicized Text</i></p>")

Also, check out Lazycat's RTF Plugin or search the forum for Office automation.

thanks for that will check it out and see if its gunna do what i want it too....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...