0

The following excel vba code paste table as picture from excel to word file at the start location one after another as may times the code runs. Please some body help me with the code to past the table as picture in paragraph 9 and when it run second time and so on should able to paste in second page of paragraph 9 and so on.

Set objDoc = objWord.activedocument
Set rng = objWord.Selection

wb.Windows(1).View = xlNormalView

wb.Worksheets(1).Range(Worksheets(1).UsedRange.Address).CopyPicture Appearance:=xlScreen, Format:=xlPicture
rng.Paste
rng.typeparagraph
Community
  • 1
  • 1
dibyendu
  • 7
  • 3
  • Maybe you can make use of Bookmarks in Word? Place bookmarks at the places where you want to paste your pictures and give the bookmark a name. Before you paste set the range to this bookmark and you get the right picture at the right spot. – ffonz Apr 18 '18 at 12:13
  • Can you give me a link to your description as an example..... – dibyendu Apr 18 '18 at 12:41
  • Here a link about [bookmarks](https://support.office.com/en-us/article/add-or-delete-bookmarks-d13f4bab-fb76-4e09-9c3a-239e1a0c1568) in Word. And [here](https://stackoverflow.com/questions/2725550/how-to-jump-to-a-bookmark-in-word-vba-and-insert-text) a stackoverflow question about using bookmarks with VBA. – ffonz Apr 18 '18 at 12:51
  • Thank you very much..... I have solved the problem with bookmarks – dibyendu Apr 21 '18 at 19:08

1 Answers1

0

I have a entire word file with excel inputs, but i made it the other way arround...

On the world you can reference the picture from de excel file and the text you need, every time you open the word file it will update those inputs.

Dani M
  • 16
  • 3