Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting picture to specific place in Word
Message
From
07/01/2009 12:46:01
 
 
To
07/01/2009 11:17:08
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01371692
Message ID:
01371800
Views:
14
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform