Jump to content
Server Maintenance This Week. ×

Insert image into rtf file


tv_kid

This topic is 6290 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi guys

Is there a way of sending a command from FM to Word to insert an image at a specified point in the file?

I have an rtf report created by exporting xml and transforming with an xslt sheet. However, I can't export the contents of a container field, so would like to be able to export to a specified location and then use a command to 'pick it up' and insert at a place holder in the rtf / word doc.

Is this possible?

Thanks in advance.

Link to comment
Share on other sites

FM does not have direct commands for this. You'd have to use VBscript generated from FM that uses the Word Object Model. Then you can export from FM, have Word pick it up, insert it into the document and save the document as RTF. The heavy lifting here is through the VBscript talking "Word". (This can all be done invisible to the user).

The challenge from FM is how to generate, execute and clean up the VBscript, returning any errors to FM so you can handle them.

So the question really is: how much VBscript can you do? In other words: this is more of a Word coding skill than a FM coding skill.

Link to comment
Share on other sites

So the question really is: how much VBscript can you do? In other words: this is more of a Word coding skill than a FM coding skill.

I've never done any! I would be interested in learning, but not certain that I have the time at the moment, with trying to also learn xml, php ....

I'm looking at other ways of achieving the report in question, but will certainly bear this in mind.

As it happens, this particular report will be created on a pc most of the time, so it could utilise VBscript.

Thanks for your advice.

Link to comment
Share on other sites

This topic is 6290 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.