+ Reply to Thread
Results 1 to 5 of 5

print text file with UTF8 encoding

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    35

    print text file with UTF8 encoding

    I am trying to print from excel a text file of a sheet data, creating the text file works but I need to have it encoded as UTF8?? Here is the code I have to print.
    Please Login or Register  to view this content.
    Not sure if I need to add something to this or do I have to open the text file in Notepad and do the convert to UTF8 there?
    Thanks
    Dale

  2. #2
    Forum Contributor
    Join Date
    12-14-2013
    Location
    Tilburg, Nederland
    MS-Off Ver
    Excel 2010
    Posts
    256

    Re: print text file with UTF8 encoding

    Try this:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-25-2012
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: print text file with UTF8 encoding

    Hi I am getting an error with this line
    Set AsT = CreateObject("ADODB.Stream")
    Do I need to change ADODB to something?

  4. #4
    Forum Contributor
    Join Date
    12-14-2013
    Location
    Tilburg, Nederland
    MS-Off Ver
    Excel 2010
    Posts
    256

    Re: print text file with UTF8 encoding

    I made a mistake by assuming that the file you wanted to write to, exists ( Assumption = the mother of all FU).
    - Added testing if the file exists and creating if not.
    The code attempts to makes a ADODB connection with the file, so it must be existing.....

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-25-2012
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: print text file with UTF8 encoding

    Great thanks that worked
    Dale

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Utf8 encoding
    By reikia2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2012, 03:05 PM
  2. Replies: 8
    Last Post: 06-16-2011, 11:49 AM
  3. encoding a text file written by VBA
    By duckboy1981 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-19-2009, 01:02 PM
  4. [SOLVED] How can I transfer a Utf8 file from word to excel?
    By Shawn in forum Excel General
    Replies: 0
    Last Post: 05-20-2005, 10:06 AM
  5. [SOLVED] Prompted to convert the file's text encoding...
    By Darryl in forum Excel General
    Replies: 0
    Last Post: 03-01-2005, 05:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1