Skip to main content
Question

MSWordStyler how to include picture in table?

  • March 6, 2019
  • 10 replies
  • 396 views

jdh
Contributor
Forum|alt.badge.img+38

I would like create a MSWord document that includes a table that has 3 columns. The first two columns are just attributes, but the third should be a thumbnail image, whose path is stored in an attribute.

 

 

I can use the MSWordStyler to generate a table, I can also use it to add the pictures.

What I haven't been able to figure out is how to add the pictures in the 3rd column of the table.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

10 replies

arnovananrooij
Contributor
Forum|alt.badge.img+5

I don't think this is possible in word with FME. It is possible in html with the html report generator using custom HTML:

https://knowledge.safe.com/questions/84748/conditional-html-report-formatting-and-table-conte.html

You can open HTML documents with word.


ebygomm
Influencer
Forum|alt.badge.img+45
  • Influencer
  • March 7, 2019

Do you need to avoid python?


jdh
Contributor
Forum|alt.badge.img+38
  • Author
  • Contributor
  • March 8, 2019

Do you need to avoid python?

No, python is fine.

 

 

What I'm hoping to avoid is falling down the rabbit hole of custom jsonSnippets/XML that @janb pioneered.

ebygomm
Influencer
Forum|alt.badge.img+45
  • Influencer
  • March 8, 2019

No, python is fine.

 

 

What I'm hoping to avoid is falling down the rabbit hole of custom jsonSnippets/XML that @janb pioneered.

I have a workflow that creates the table in a word document with the image column populated with the imagepath, then after a featurewriter uses a pythoncaller to replace that text with the image specified by the path. It's on my machine at home, so I can share later.


jdh
Contributor
Forum|alt.badge.img+38
  • Author
  • Contributor
  • March 11, 2019

I have a workflow that creates the table in a word document with the image column populated with the imagepath, then after a featurewriter uses a pythoncaller to replace that text with the image specified by the path. It's on my machine at home, so I can share later.

@egomm I would love to see that workflow.


ebygomm
Influencer
Forum|alt.badge.img+45
  • Influencer
  • March 11, 2019

@egomm I would love to see that workflow.

write_to_word_python.fmwt

It's never been used in anger, but was something I was experimenting with, but might give you some ideas.

 


jdh
Contributor
Forum|alt.badge.img+38
  • Author
  • Contributor
  • March 11, 2019

write_to_word_python.fmwt

It's never been used in anger, but was something I was experimenting with, but might give you some ideas.

 

Thanks, this gives me lots of ideas.

 

 

EDIT: docX is awesome, I've gone to creating the entire document in python, rather than have a dozen samplers and MSWordStylers to create all the necessary hierarchy.

oliviergayte
Contributor
Forum|alt.badge.img
  • Contributor
  • March 14, 2019

Thank you egomm.

Your script is great!


venu
Contributor
Forum|alt.badge.img+5
  • Contributor
  • April 3, 2022

No, python is fine.

 

 

What I'm hoping to avoid is falling down the rabbit hole of custom jsonSnippets/XML that @janb pioneered.

can share again


andreaatsafe
Safer
Forum|alt.badge.img+14

No, python is fine.

 

 

What I'm hoping to avoid is falling down the rabbit hole of custom jsonSnippets/XML that @janb pioneered.

Hi @venu​ ,

The comment above has been updated with the link to the workspace "write_to_word_python.fmwt" now.

-Andrea