Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  

WordFile.SetMediaFile

Sets a media file image.

Component: WordFile
Version: 6.3
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "WordFile.SetMediaFile"; WordFile; Name; Image )

Parameters

Parameter Description Example value
WordFile The reference number of the open word file. $wordFile
Name The name of the item to query. "image1.jpeg"
Image The container value with the image. Test::MyImage

Result

Returns OK or error.

Description

Sets a media file image.
You can use this function to replace a placeholder image with a new image.
Please make sure the new image has same dimensions and same file type as the original one.

Examples

Replace image:

Set Variable [$w; Value:MBS( "WordFile.OpenContainer"; WordTest::wordfile )]
Set Variable [$r; Value:MBS( "WordFile.SetMediaFile"; $w; "image1.jpeg"; WordTest::image)]
Set Variable [$r; Value:MBS( "WordFile.WriteFile"; $w; "/Users/cs/Desktop/output.docx")]
Set Variable [$r; Value:MBS( "WordFile.Release"; $w)]

See also


WordFile.SetMarkers   -   WordFile.SetXML

Feedback: Report problem or ask question.




Links
MBS Real Studio PDF Plugins - Besuchen Sie die Jugendzentrum Nickenich Webseite