Re: Imbedding a JPEG image in a MSWord document using APL




<bourketim@xxxxxxxxxxx> wrote in message news:7868cca8-d485-4b1a-9df4-8fdc1f1425e8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Has anyone done this and, if so, will you share the APL code? (I'm to
old and sore to reinvent any wheels :) )

In the absence of any more details about the context of your question the code below will create an instance of Word using APL+WIN and insert a jpg image file. Anything more sophisticated will need you to study the Word object model and translate the VB examples you can get from the Microsoft Visual Basic Reference section of Word help into your flavour of APL:

AddImage
[1] ⎕wself←'word' ⎕wi 'Create' 'Word.Application'
[2] 0 0⍴⎕wi 'xDocuments.Add'
[3] 0 0⍴⎕wi 'xSelection.InlineShapes.AddPicture' 'c:\example.jpg' 0 1
[4] ⎕wi 'xvisible' 1

Graham.

.



Relevant Pages

  • Re: An argument against modus ponens
    ... So "if P" requires the consideration of another element or object through which a truth value may be ascertained. ... 'If P' entails either only P or the absence of P, but does not entail R. However, I argue that in this case, the absence of P entails the absence of the context of P. ... If the absence of P did not entail the absence of the context of P, and the context of P is retained, then the absence of P must be represented in that context. ... For example, if P is a physical object and if we retain the context of physical objects, then the absence of P is a vacuum, or a lost or hidden object, or some such. ...
    (sci.logic)
  • Re: Imagine a brake that everyone wanted....
    ... >I am trying to figure out if the wheels were to slide if that would ... Or will an ABS do it? ... >earlier as an example of how much other technology might cost. ... The comment makes perfect sense in context. ...
    (rec.sport.skating.inline)
  • Re: An argument against modus ponens
    ... 'If P' entails either only P or the absence of P, but does not entail R. However, I argue that in this case, the absence of P entails the absence of the context of P. ... If the absence of P did not entail the absence of the context of P, and the context of P is retained, then the absence of P must be represented in that context. ... For example, if P is a physical object and if we retain the context of physical objects, then the absence of P is a vacuum, or a lost or hidden object, or some such. ...
    (sci.logic)
  • Re: An argument against modus ponens
    ... 'If P' entails either only P or the absence of P, but does not entail R. However, I argue that in this case, the absence of P entails the absence of the context of P. ... If the absence of P did not entail the absence of the context of P, and the context of P is retained, then the absence of P must be represented in that context. ... For example, if P is a physical object and if we retain the context of physical objects, then the absence of P is a vacuum, or a lost or hidden object, or some such. ...
    (sci.logic)
  • Re: Lack of evidence does not constitute proof of nonexistence
    ... good evidence of absence, depending upon the context. ... It is, I agree, very hard to prove the absolute non-existence of something. ...
    (soc.history.ancient)

Loading