LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to Print Text to file in UTF-8

Hello,

I am trying to print the value of a cell in Excel to a file "temp.html". The
button's macro looks like this:

Sub Text()
Dim i As Long
Open "c:\temp\Homepage.html" For Output As #1
For i = 1 To Selection.Cells.Count
Print #1, Selection.Cells(i).Value
Next i
Close 1
End Sub

I need to know what to add to this code so that the file is created as UTF-8
encoding. I am trying to preserve foreign characters, and currently they are
all being saved as "???????????".

Thanks!

--
Message posted via http://www.officekb.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a macro to print to file [email protected] Excel Programming 1 July 12th 08 12:54 PM
run macro then print the results as pdf file changing the name eac Richard Ward[_2_] Excel Discussion (Misc queries) 0 October 26th 07 10:01 PM
Print / Write to text file and usage of buttons [email protected] Excel Programming 1 March 2nd 07 02:09 PM
Print content of cells to a text file loopoo[_2_] Excel Programming 2 November 17th 05 04:29 PM
How to print current data and time to text file Dayanand Excel Programming 2 May 31st 04 10:50 AM


All times are GMT +1. The time now is 09:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"