Only a fraction of images are imported from Word doc

This forum is for all Flare issues related to importing files or projects.
Post Reply
BrianAtInTouchHealth
Propeller Head
Posts: 51
Joined: Thu Dec 27, 2018 10:35 am
Location: Goleta (Santa Barbara County), CA
Contact:

Only a fraction of images are imported from Word doc

Post by BrianAtInTouchHealth »

Hi,

I imported a Word doc into Flare and everything seemed to go smoothly but with the normal issues I've seen in the past (e.g., I got a new unneeded style sheet). However, when I open the topic file I immediately noticed only a small fraction of the images were imported. (47 of 498 images were imported.) After a little experimenting I found a pattern: of the 47 images that were imported they were all inline images while all of the floating images were ignored. I've been importing Word docs into Flare for years but I've never seen this before. (I'm running Flare 2018 r2.) As an alternative I saved the Word file as a web page and then imported the web page into Flare. The good news is all the figures were imported. The bad news is that the formatting was all messed up.

Has anyone else seen this before? If so, do you have a workaround?

Thanks,
Brian
Flare :flare: + Analyzer :analyzer: 2022, Central, Capture :capture: 7.0, Mimic :mimic: 8.1
Psider
Propellus Maximus
Posts: 815
Joined: Wed Jul 06, 2011 1:32 am

Re: Only a fraction of images are imported from Word doc

Post by Psider »

I wrote a Word macro to convert floated shapes to inline shapes before I import, which might help.
Try on a copy of your document first. :)

Code: Select all

Sub SetShapesToInline()
    Dim simg As Shape

    For Each simg In ActiveDocument.Shapes
        simg.WrapFormat.Type = wdWrapInline
    Next simg
    
End Sub
If you aren't familiar with Macros, this should work to set it up:
  1. In Word, select View > Macros > View Macros.
  2. In the Macro name field type "SetShapesToInline".
  3. Click Create. The Developer environment opens at a new blank macro. It should look like:

    Code: Select all

    Sub SetShapesToInline()
    '
    ' SetShape Macro
    '
    '
    
    End Sub
  4. Copy and paste the following just above End Sub

    Code: Select all

        Dim simg As Shape
        For Each simg In ActiveDocument.Shapes
            simg.WrapFormat.Type = wdWrapInline
        Next simg
  5. Save
  6. Switch to your document
  7. Select View > Macros > View Macros
  8. Select the macro from the list and click Run. All shapes that can be are switched to inline shapes.
It might not catch everything, but hopefully most stuff will come through. (It might also have unintended consequences if you are using the drawing tools to add callouts, etc to your images...)
BrianAtInTouchHealth
Propeller Head
Posts: 51
Joined: Thu Dec 27, 2018 10:35 am
Location: Goleta (Santa Barbara County), CA
Contact:

Re: Only a fraction of images are imported from Word doc

Post by BrianAtInTouchHealth »

Psider,

Thank you for your quick response! Unfortunately, I haven't used Word macros in over 20 years and I seemed to have crashed the macro editor. No matter what I do now I get a "Compile error" Invalid outside procedure" error message. Now I can't even create a new macro.
cannot-create-macro.PNG
Not sure what to do now. :oops:

Brian
You do not have the required permissions to view the files attached to this post.
Flare :flare: + Analyzer :analyzer: 2022, Central, Capture :capture: 7.0, Mimic :mimic: 8.1
BrianAtInTouchHealth
Propeller Head
Posts: 51
Joined: Thu Dec 27, 2018 10:35 am
Location: Goleta (Santa Barbara County), CA
Contact:

Re: Only a fraction of images are imported from Word doc

Post by BrianAtInTouchHealth »

Ah, found the problem. I deleted the following line by mistake:

Code: Select all

Sub SetShapesToInline()
I just ran it and it worked. Thanks for your help. :D

By the way, the reason I haven't used macros since the '90s is thanks to the Concept Macro Virus. At the place I was working at in '95 it ruined virtually every Word doc.

Brian
Flare :flare: + Analyzer :analyzer: 2022, Central, Capture :capture: 7.0, Mimic :mimic: 8.1
Psider
Propellus Maximus
Posts: 815
Joined: Wed Jul 06, 2011 1:32 am

Re: Only a fraction of images are imported from Word doc

Post by Psider »

Glad you got it working. And yeah, the virus thing is a problem. Also partly why I only posted a snippet of my full macro - it should be possible for most people to get the gist of what it's doing and so not worry about evilness. :)
Post Reply