export excel multiple table to word -


i have excel many table in 1 sheet, have grouping table product , sparate each table space , header, how export each table excel word

product | sub_porduct | price |       |    1231     |   6   |       |    3331     |   5   |       |    1233     |   9   |  product | sub_porduct | price | b       |    1299     |   10  |   b       |    1001     |   9   |  product | sub_porduct | price | c       |    1871     |  15   |   c       |    1854     |  17   |           c       |    1782     |  19   | c       |    1771     |  18   | 

many thx advice

i tried generate data word below code

sub roundedrectangle2_click()  dim wdapp object  dim wd object  dim maxrow long  dim orderno4 long  dim orderno long  dim orderno2 long  dim wrksht worksheet  dim orderno3 long  on error resume next  set wdapp = getobject(, "word.application")  if err.number <> 0      set wdapp = createobject("word.application")  end if  on error goto 0    set wrksht = sheet1  set wd = wdapp.documents.add  wdapp.visible = true  maxrow = wrksht.range("a1").end(xldown).row     ' msgbox wrksht.range("a1").end(xldown).row    wrksht.activate  orderno = 1  orderno2 = orderno 843      orderno = cells(orderno2, 1).end(xldown).row      'set rng = range("a" & orderno2 & ":c" & orderno).select      set rng = activecell.range("a" & orderno2 & ":c" & orderno)      'set rng = activecell.range(cells(orderno, 1), cells(orderno3, 3))        rng.copy        wd.range          .collapse direction:=0                  'slutet av dokumentet          .insertparagraphafter                   'lägg till rad          .collapse direction:=0                  'slutet av dokumentet          .pastespecial false, false, true        'pasta som enhanced metafile    end  orderno2 = orderno + 1  next  end sub

i tried check per line if null value. if found cursor range. use null row break each table. code not work. idea fix it?

edit: change code above , success, in line hundred script stop error "run-time error "4605": method or property not available because clipboard empty or not valid."

how handle error?


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo