Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Automation
Message
De
18/09/2001 09:20:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
18/09/2001 09:09:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00557740
Message ID:
00557760
Vues:
8
>THats what i thought
>
>heres the word basic macro that i recorded but i dont see how to adapt it.!
>
>
>Sub Macro1()
>'
>' Macro1 Macro
>' Macro recorded 17/09/01 by Colin Burton
>'
> Selection.InlineShapes.AddPicture FileName:= _
> "C:\vms\001-VAN.M-15030-SMALL.GIF", LinkToFile:=False, SaveWithDocument:= _
> True
>End Sub

Well, I don't know for sure. I have done Excel automation, mainly, not Word. First of all, you have to check the Word Object Model, to see where you apply "Selection". If you have a pointer, oDocument, to the current document, perhaps something like oDocument.Selection... would work. "_" is, of course, the line-continuation character, similar to ";" in VFP. VBA accepts named parameters, VFP doesn't. Therefore, you have to check (in VBA) the syntax of the function AddPicture, to get a version of the function which specifies parameters by position, not by name.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform