0 votes
in VBA by Beginner (2 points)
Can the font type or font size be determined via VBA Excel for output to a text file?
by Super Expert (2.7k points)
What file format are you wanting to save your text file as? Traditional text files (.txt) don't retain font type or font size information.
by Beginner (2 points)
Thank you for the prompt reply. I am trying to save in a text file with specific font type and size via VBA excel.

1 Answer

0 votes
by Skilled (279 points)
Hi Francis,

As Ryan stated, the TXT file format doesn't retain formatting, unlike Microsoft Word, for example.

However, I suspect that you actually want to dump the actual information about fonts into a text file. If that guess is correct, the approach depends on whether you are looking for a generic data "dump" of some or all of the fonts available on your system (or, at least, in Excel), or whether you have a need to retain information about specific cells in a specific worksheet.

Can you tell us more about what you are trying to accomplish? A sample of the actual expected text would be very helpful!

 

Cheers,

 

Mitch

Welcome to wellsr Q&A
wellsr Q&A is the VBA and Python programming community that rewards you for learning how to code.

Getting Started
Register
VBA Cheat Sheets (On Sale Now)

Earn free prizes for asking VBA and Python questions and for answering questions asked by others in our community.

What makes us different?
Our points system rewards you with a chance for free gifts based on the quality of your questions and answers. All you have to do is post and you could get rewarded, like these members:

Hightree $10 Amazon Gift Card
Thales1 $10 Amazon Gift Card
runfunke $10 Amazon Gift Card
coolag $10 Amazon Gift Card
Siew Hun $10 Amazon Gift Card

So, why don't you join us? It really is an encouraging way to motivate members in our VBA and Python community.

Register

For more programming tips visit the VBA Tutorials Blog and the Python Tutorials Blog.

...