I hae a question about using COM objects

Dean C. Reed

New Member
Hello all. I am trying to add an image to a MS Word document via COM objects. I can get the image into the document by using "addPicture()", but I don't know how to position the picture inside the document. I know what I need (inlineshapes etc), but when I try it, I get exception errors. The syntax "seems" to match what I see in the COM object viewer, but apparently I am missing something.

Does anyone have examples of adding pictures to documents via Progress?

Thanks.

Dean
 
hey dean

i'm having trouble even with starting Word.Application Componet with progress handle.

DEFINE VARIABLE chWordApplication AS COM-HANDLE.
/* create a new Word Application object */
CREATE "Word.Application" chWordApplication.
/* chWordApplication:Visible = TRUE. */

I compile the first 2 lines and get error message# 5894. I looked into the KBs and Docs and tried to do whatevr .i.e like removing Norton Antivirus etc but still no luck.
Could you pls. send me your sample code & I will try atleast to open and write a couple of lines in the doc.


Progress 9.1B trying to connect to Word 2000.

Thanks I Adv.
 
Hello,
Have u tried to make a new macro in word and then see the generated code. Then i think u'll find all syntax u need. I do that for all ole interactivity i've to develop in word or excel.
 
Here's what we do:

insertion-point:TypeParagraph.
insertion-point:ParagraphFormat:Alignment = wdAlignParagraphLeft.
invoice-images:ADDPICTURE(assembled-image,FALSE,TRUE,).

QUOTE=Dean C. Reed]Hello all. I am trying to add an image to a MS Word document via COM objects. I can get the image into the document by using "addPicture()", but I don't know how to position the picture inside the document. I know what I need (inlineshapes etc), but when I try it, I get exception errors. The syntax "seems" to match what I see in the COM object viewer, but apparently I am missing something.


Does anyone have examples of adding pictures to documents via Progress?

Thanks.

Dean[/QUOTE]
 
Back
Top