<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Dansk Regneark Forum : Tabel fra word til excel</title>
  <link>https://forum.excel-regneark.dk/</link>
  <description><![CDATA[Dette er et XML Feed af; Dansk Regneark Forum : Makro og VBA : Tabel fra word til excel]]></description>
  <pubDate>Sat, 05 Dec 2026 09:33:26 +0000</pubDate>
  <lastBuildDate>Mon, 10 Mar 2014 15:57:05 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.08</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.excel-regneark.dk/RSS_post_feed.asp?TID=1586</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Dansk Regneark Forum]]></title>
   <url>https://forum.excel-regneark.dk/css_styles/Excel-regneark.dk/logo.png</url>
   <link>https://forum.excel-regneark.dk/</link>
  </image>
  <item>
   <title><![CDATA[Tabel fra word til excel : Jeg fors&#248;ge at kopiere flere tabeller...]]></title>
   <link>https://forum.excel-regneark.dk/tabel-fra-word-til-excel_topic1586_post7387.html#7387</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=1094">krich</a><br /><strong>Emne:</strong> 1586<br /><strong>Sendt:</strong> 10.Mar.2014 kl. 15:57<br /><br /><p>Jeg forsøge at kopiere flere tabeller fra et worddokument over i et excel, hvortil jeg har fundet en rigtig god vba på nettet (se nedenstående). Jeg har meget lidt erfaring med vba og vil derfor høre, om nedenstående kan redigeres, så den&nbsp;OGSÅ kan:</p><ul><li>kopiere "merged" tabeler</li><li>kopiere "numeriske tal"</li></ul><p><br></p><p><em>Sub ImportWordTable()<br>&nbsp;&nbsp;&nbsp; On Error GoTo errHandler<br>&nbsp;&nbsp;&nbsp; Dim wordDoc As Object<br>&nbsp;&nbsp;&nbsp; Dim wdFileName As Variant<br>&nbsp;&nbsp;&nbsp; Dim noTble As Integer<br>&nbsp;&nbsp;&nbsp; Dim rowNb As Long<br>&nbsp;&nbsp;&nbsp; Dim colNb As Integer<br>&nbsp;&nbsp;&nbsp; Dim x As Long, y As Long<br>&nbsp;&nbsp;&nbsp; x = 1: y = 1<br>&nbsp;&nbsp;&nbsp; wdFileName = Application.GetOpenFilename("Word files (*.doc),*.doc", , _<br>&nbsp;&nbsp;&nbsp; "Browse for file containing table to be imported") 'adjust this to the document type you are after<br>&nbsp;&nbsp;&nbsp; If wdFileName = False Then Exit Sub<br>&nbsp;&nbsp;&nbsp; Set wordDoc = GetObject(wdFileName)<br>&nbsp;&nbsp;&nbsp; With wordDoc<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; noTble = wordDoc.tables.Count<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If noTble = 0 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox "No Tables in this document", vbExclamation, "No Tables to Import"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For k = 1 To noTble<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .tables(k)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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p;&nbsp;&nbsp; End With<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x = x + 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next<br>&nbsp;&nbsp;&nbsp; End With<br>&nbsp;&nbsp;&nbsp; Set wordDoc = Nothing<br>&nbsp;&nbsp;&nbsp; Exit Sub<br>errHandler:<br>&nbsp;&nbsp;&nbsp; MsgBox "Error in generating tables - " &amp; Err.Number &amp; " - " &amp; Err.Description<br>End Sub</em><br></p>]]>
   </description>
   <pubDate>Mon, 10 Mar 2014 15:57:05 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/tabel-fra-word-til-excel_topic1586_post7387.html#7387</guid>
  </item> 
 </channel>
</rss>