Results 1 to 10 of 22

Thread: String text in Word html. Passing info between Word and Excel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    The HTML text of the content – our stuff as seen in HTML coiding.
    The last few postings seem to tell us that the content we are interested in, that is to say what we put in the document seems to lie in between the HTML text of
    <div class=WordSection1>
    And something of the form
    <p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

    </div>


    Or
    <p class=MsoNormal><o:p>&nbsp;</o:p></p>

    <p class=MsoNormal><o:p>&nbsp;</o:p></p>

    <p class=MsoNormal><b><span style='color:#D99594;mso-themecolor:accent2;
    mso-themetint:153'>X <span class=SpellE>x</span> <span class=SpellE>x</span> <span
    class=SpellE>x</span> <span class=SpellE>x</span> <o:p></o:p></span></b></p>

    </div>

    The end point might not be too clear, but if we take all the text from <div class=WordSection1> to </div> then it looks like we will catch all of “our stuff”

    In that text of our stuff we see 6 bits with a .jpg and 6 bits with .png
    Comparing that with the typical files produced .._
    _.. , and considering that the document has clearly 6 images.._

    _.. we see that we appear to get for each image a .jpg and a .png


    ( By the way, We can see some info from Microsoft on this …. To extract embedded images from a Word document …… Save As ….. Web Page (*.htm; *.html)
    Images will be extracted from the document and placed in the folder named <DocumentName>_files in the same location as the saved web page .

    https://support.microsoft.com/en-us/...c-3eeb284af36b
    http://web.archive.org/web/202103021...c-3eeb284af36b
    )

    Macro to get this image info.
    It’s not too difficult to write a macro to list those files
    Example
    VBA seems to recognise in the following macro type both .htm and .txt files as just long strings of text.
    So I can do a macro to import that text string, then do some simple string manipulation to get the text bits looking like .jpg or .png file names

    I will do that in the next post
    Last edited by DocAElstein; 09-14-2021 at 01:01 PM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

Similar Threads

  1. Replies: 1
    Last Post: 04-02-2019, 03:04 PM
  2. Export data (text) Excel to Ms Word Format
    By muhammad susanto in forum Excel Help
    Replies: 0
    Last Post: 10-06-2017, 09:36 AM
  3. Replies: 7
    Last Post: 08-24-2015, 10:58 PM
  4. VBA How to pass formatted text from Excel to MS Word
    By johnweber in forum Excel Help
    Replies: 2
    Last Post: 03-01-2015, 08:41 PM
  5. Replies: 1
    Last Post: 10-16-2012, 01:53 PM

Posting Permissions

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