Consulting

Results 1 to 2 of 2

Thread: help!!! save notepad in UTF-8 encoding

  1. #1

    help!!! save notepad in UTF-8 encoding

    Hi friends!!!

    I am literally to get this!!!

    How to open edit and save a notpad in UTF-8 encoding using vba!!

  2. #2
    VBAX Regular Mahahaava's Avatar
    Joined
    Feb 2008
    Location
    Lohja, Finland
    Posts
    26
    Location
    Hi,

    used the MAcro-recorder: UTF-8 is the BOLD-line in the following:
    (this works for opening but as for saving... Dunno)
    [vba]
    Sub Macro2()
    '
    ' Macro2 Macro
    ' Macro recorded 16.12.2008 by Patu
    '

    '
    With ActiveSheet.QueryTables.Add(Connection:="TEXT;C:\layers.txt", _
    Destination:=Range("A1"))
    .Name = "layers"
    .FieldNames = True
    .RowNumbers = False
    .FillAdjacentFormulas = False
    .PreserveFormatting = True
    .RefreshOnFileOpen = False
    .RefreshStyle = xlInsertDeleteCells
    .SavePassword = False
    .SaveData = True
    .AdjustColumnWidth = True
    .RefreshPeriod = 0
    .TextFilePromptOnRefresh = False
    .TextFilePlatform = -535
    .TextFileStartRow = 1
    .TextFileParseType = xlDelimited
    .TextFileTextQualifier = xlTextQualifierDoubleQuote
    .TextFileConsecutiveDelimiter = False
    .TextFileTabDelimiter = True
    .TextFileSemicolonDelimiter = False
    .TextFileCommaDelimiter = False
    .TextFileSpaceDelimiter = False
    .TextFileColumnDataTypes = Array(1, 1, 1, 1)
    .TextFileTrailingMinusNumbers = True
    .Refresh BackgroundQuery:=False
    End With
    End Sub[/vba]

    /Petri

Posting Permissions

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