CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2000
    Posts
    14

    Convert Word Documents to RTF

    Hello,

    Could anybody please provide me a way to convert Word Documents to RTF programmatically without opening the document?


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Convert Word Documents to RTF

    'Try this ( of course Word lib must be added)

    Sub ConvertWordDoc()
    Static WordObj As Word.Application
    Set WordObj = CreateObject("Word.Application")
    WordObj.Documents.Open ("c:\my documents\test.doc")
    'Disable viewing the Word session
    'and its document
    WordObj.Visible = False
    WordObj.ActiveDocument.SaveAs "c:\my documents\test.rtf", wdFormatRTF
    WordObj.Quit savechanges:=False
    Set WordObj = Nothing
    End Sub


    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Sep 2000
    Posts
    14

    Re: Convert Word Documents to RTF

    Thank you, it works.


  4. #4
    Join Date
    Mar 2002
    Posts
    5

    Re: Convert Word Documents to RTF

    Does anyone know how to use the word object model in embedded VB. I need a program to convert pocket word docs to text files. Thanks.


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured