AnsweredAssumed Answered

vrf Attaching GPIBshot picture to desired point in MS Word document

Question asked by VRFuser on Jun 26, 2005
Try this command:

wordApp.Selection.InlineShapes.AddPicture("c:Pictures     estdata.jpg")

Navigate the document using your Find/Replace code, and use the command above to paste the picture into your doc at whatever point you chose via FIND/REPLACE function. I have hard wired the path for you so you can see how the string should look. You can easily replace the hard wired string with a variable.


I have a more complex method of doing this that uses a word table template file (1 col by 1 row) but I don't think you need that level of complexity. Here it is so you can get the gist of it.

WordApp.ChangeFileOpenDirectory(report_dir);    // This makes word open up in the directory where your picture frame template is located, set the variable "report_dir" before executing this object
WordApp.Selection.InsertFile("picture_frame.doc"); // Open a picture frame template that is scaled to your needs, You need to make this .DOC file manually and place it into the "report_dir" folder
wordApp.Selection.MoveDown(wdScreen,24);
wordApp.Selection.TypeText("Test-setup photo(s):"); // Picture caption header
wordApp.Selection.TypeParagraph();
wordApp.Selection.TypeText(A); // Picture caption text to go after header (fed by input pin A)
wordApp.Selection.TypeParagraph(); // carriage return
wordApp.Selection.InlineShapes.AddPicture(C); // Insert the picture that is named in the path on Input C.
wordapp.Selection.InsertBreak(wdPageBreak); // Page Break

Hope this helps. Looks like you are doing some FCC transmitter testing for cell phones, fun stuff !!!

Jeff Davis
CDI Engineering Solutions Aerospace Technologies
Embedded Systems and Electronics
3137 E Elwood #160
Phoenix, Arizona 85034
Phone: (602)431-4497 (x226)
Cell: (480)330-1431
Fax: (602)431-4435


> -----Original Message-----
> From: Jarkko.Jokela@nokia.com [mailto:Jarkko.Jokela@nokia.com]
> Sent: Sunday, June 26, 2005 11:24 PM
> To: VRF
> Subject: [vrf] Attaching GPIBshot picture to desired point in MS Word
> document
>
>
> Hi all!!
>
> I have a problem. I want to save a gpibshot picture (saved to
> PC) to MS Word. Actually I want to determine the exact point
> of the picture with help of the tags, because I link pictures
> to the old report template.
> Text is able to attach in this method but how about the pictures.
>
>  <<FCCIC BT.doc>>  <<wordi.vee>>
> best regards
>      Jarkko Jokela
>
> ---
> You are currently subscribed to vrf as: jeff.davis@cdi-es.com
> To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
> To unsubscribe send a blank email to
> "leave-vrf@it.lists.it.agilent.com".
> To send messages to this mailing list,  email "vrf@agilent.com". 
> If you need help with the mailing list send a message to
> "owner-vrf@it.lists.it.agilent.com".
>
> _____________________________________________________________________
> This e-mail message has been scanned for the presence of all
> known computer viruses by the MessageLabs Virus Control
> Center.  However, it is still recommended that you use local
> virus scanning software to monitor for the presence of viruses. 
>  << File: FCCIC BT.doc >>  << File: wordi.vee >>

_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com

---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes