dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: little problem

  1. #1
    Join Date
    Aug 2002
    Location
    Erkner near Berlin
    Posts
    84

    little problem

    i need to get out the font-names used in a ms word-file without using the api or opening word at all
    i want to put it into a listbox, but i do not know, how to get them out
    could anybody help me, please?

  2. #2
    Join Date
    Aug 2002
    Location
    Armenia
    Posts
    62
    what about common dialog?
    Method - ShowFont

  3. #3
    Join Date
    Aug 2002
    Location
    Erkner near Berlin
    Posts
    84
    what do you mean?

  4. #4
    Join Date
    Aug 2002
    Location
    Erkner near Berlin
    Posts
    84
    imagine, you do not have installed ms word, but you want to see some information about some word-files, (from the header but also from the table-stream --> e.g. the fonts)
    from the header it's easier but i don't know how to get these from the table stream!!

  5. #5
    Join Date
    Apr 2002
    Posts
    388
    i dont really know if this method works if word is not installed, but try it (i have got no computer where it isnt installed)
    (From MSDN Q184974: OFF: How to Use (OLE) Automation with Word)
    Code:
       ' Declare the variable.
       Dim objWD As Word.Application
       ' Set the variable (runs new instance of Word.)
       Set objWD = CreateObject("Word.Application")
       ' Add a new document.
       objWD.Documents.Add
       ' Add some text.
       objWD.Selection.TypeText "This is some text."
       ' Save the document.
       objWD.ActiveDocument.SaveAs filename:="mydoc.doc"
       ' Quit Word.
       objWD.Quit
    hope i could help you and dont forget to wote!!!
    mfg Ungi

    Music, music and VB. VB is like music: You never know how it is interpreted.

  6. #6
    Join Date
    Aug 2002
    Location
    Erkner near Berlin
    Posts
    84
    the problem is that this doesn't work
    you use the api and open word with it

    i have to create a stand-alone-application to analyze files of different types

    so i filled an array of bytes with the content of the word-file and so i can take information e.g. from the header.

    but it's harder to take information from the table-stream.

    perhaps anyone can tell me more .....................


  7. #7
    Join Date
    Feb 2002
    Location
    Makati City, Philippines
    Posts
    1,054
    You must know the format of MS Word to get what you want. Check this link for MS Word file format.

    http://www.wotsit.org/search.asp?s=text
    Marketing our skills - please participate in the survey and share your insights
    -

  8. #8
    Join Date
    Aug 2002
    Location
    Erkner near Berlin
    Posts
    84
    i have just read that, but i do not know, how to read information from the table stream!
    in this information about ms word binary file format i cannot find, wher the offset of the table-stream is (if there is something like an offset)

    i did not work with file formats yet
    but perhaps anybody has just got some knowledge with it

    i would be really happy

    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)