Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting picture to specific place in Word
Message
De
07/01/2009 12:46:01
 
 
À
07/01/2009 11:17:08
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01371692
Message ID:
01371800
Vues:
16
Hi
I created word document "c:\carddoc.doc" and I added two bookmarks "picrear"&"picfront".
Here is code with bookmark, I get 20 pages with junk characters:
In this example I try to change both with other same picture for both.
sendpictoword()
procedure sendpictoword
	livfpwinstate = _screen.windowstate
	_screen.windowstate= 1
	ow = createobject( 'Word.Application' )
	lcbmp = _samples + '\TASTRADE\BITMAPS\BEVERAGE.BMP'
	with ow as word.application
		.windowstate= 1
		.visible = 1
		.documents.open("c:\carddoc.doc")
		obook =ow.activedocument.bookmarks("picfront")
		orange = obook.range()
		orange.insertfile(lcbmp)
		ow.activedocument.bookmarks("picrear")
		orange = obook.range()
		orange.insertfile(lcbmp)
		.application.activate
		.selection.homekey( 6 ) && Go to top of doc
	endwith
>Perhaps bookmarks in the document? Something like:
>
>*-- No error checking to speak of here!
>*-- cPicturePath = 'c:\myPicture.jpg'
>*-- oDoc oWord.ActiveDocument
>
>IF FILE(cPicturePath)
> oBook = oDoc.Bookmarks("PictureBook")
> oRange = oBook.RANGE()
> oRange.InsertFile(cPicturePath)
>ENDIF
>
>Gary
>
>
>>Hi
>>I have to fill word document with two pictures.
>>The original and target pictures size is constant (the orinal little bigger).
>>Also the content of the word document is 99% constant.
>>How can I put the pictures on specific place, lternately, can I create word document with pictures and to say vfp to change that two pictures with other?
Thank you
Chaim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform