Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

How to copy pictures in Excel and paste them under a Word bookmark

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bon - 20 Dec 2005 09:37 GMT
Hello all

I have to implement a Word VBA which can copy pictures from MS Excel
2000 and then paste them under a Word bookmark.

I know how to copy a picture in MS Excel Worksheet to the clipboard and
then paste it under a Word bookmark. My code is as below:

Set xlWorkbook = xlApp.Workbooks.Open(FileName:=WorkbookToWorkOn)
Set xlWorksheet = xlWorkbook.Worksheets("Report1")
xlWorksheet.Range("A1:O50").Copy

ActiveDocument.Bookmarks("Report").Range.PasteSpecial link:=False,
DataType:=wdPasteMetafilePicture

But, how can I copy pictures in Excel and paste them under a Word
bookmark. I also have some conditions on determing which pictures have
to copy and paste them in workd.

Please give me some advices

Thanks
Bon
Word Heretic - 20 Dec 2005 15:41 GMT
G'day "Bon" <bonnie.tangyn@gmail.com>,

I must be missing something. You are stating you know how to do
something, then asking how to do it?

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

Bon reckoned:

>Hello all
>
[quoted text clipped - 19 lines]
>Thanks
>Bon
Bon - 21 Dec 2005 02:04 GMT
Sorry, I should state my question clearly.

Yes. I know how to copy one picture and paste them under word bookmark.
But, I need to copy several pictures and paste them under a bookmark.
The format is as follow:

Picture A title
Picture A
--New Page--
Picture B title
Picture B
--New Page--
Picture C title
Picture C

Thanks

Cheers
Bon
Word Heretic

> G'day "Bon" <bonnie.tangyn@gmail.com>,
>
[quoted text clipped - 31 lines]
> >Thanks
> >Bon
Word Heretic - 21 Dec 2005 23:25 GMT
G'day "Bon" <bonnie.tangyn@gmail.com>,

ahhhh. There are two ways here. First is to recreate the bookmark
after placing each picture - word.mvps.org/FAQs on that LOVELY little
feature.

Second, is to assign the bookmark's range to your own range object,
and use that range for inserting. Keep collapsing the range to its end
between picture insertions.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

Bon reckoned:

>Sorry, I should state my question clearly.
>
[quoted text clipped - 52 lines]
>> >Thanks
>> >Bon
Bon - 22 Dec 2005 07:14 GMT
Thanks Steven.

I use the first method you provided. It works great. Thanks.

I have to auto number the pictures as well. What methods I should use?

If Picture A exists Then
Picture A
Paste Picture
--New Page--
Else If Picture B exists Then
Picture B
Paste Picture
--New Page--
...

How can I auto number the pictures and insert it in front of the
pictures?

Thanks

Bon
Word Heretic - 17 Jan 2006 09:00 GMT
G'day "Bon" <bonnie.tangyn@gmail.com>,

Define a numbered Caption style and insert a para of that before the
table. Your tables will all autonumber perfectly.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

Bon reckoned:

>Thanks Steven.
>
[quoted text clipped - 18 lines]
>
>Bon
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.