🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16153

Re: Loosing formatting when applying styles... sometimes...

#16153
From: Iolaire_McFadden
Date: Fri, 03 Oct 2003 22:23
15 lines
1370 bytes
At Ole's suggestion I've moved to placing RTF files instead of DOC - it helpped a lot. Here is the code to make the rtf in visual basic via word:
Sub Word_to_RTF_Export()
    Dim appWord As New Word.Application
    Dim Obj As Object
    Set Obj = CreateObject("Word.basic")
    text_path = "C:\text.doc"
    Obj.FileOpen text_path
    'Replace(expression, find, replace[, start[, count[, compare]]])
    text_path = Replace(text_path, ".doc", ".rtf", , , vbTextCompare)
    Obj.FileSaveAs text_path, 6
    Set Obj = Nothing
    appWord.Quit
End Sub
This uses the Microsfot Word 9.0 Object Library and works in the background.
iolaire
Technical Details
Message-ID: <2ccd9ccb.2@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccd9ccb.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,815072b81f8e16d1
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-10-03 15:38:23 PST
From: Iolaire_McFadden@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: Loosing formatting when applying styles... sometimes...
Message-ID: <2ccd9ccb.2@webx.la2eafNXanI>
Date: Fri, 3 Oct 2003 15:23:35 -0700
References: <2ccd9ccb.-1@webx.la2eafNXanI>
Lines: 18
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit