J
Jesper Fjølner
Hi all,
I'm totally new to word vba but used to Access vba.
I'm opening af word document from Access and would like to insert a table
starting at a bookmark ("start").
However I can only find out how to put the table at the very beginning of
the document with range (rngDoc).
How do I start the table at the bookmark, "start" instead of at the
beginning of the document.
(There maybe other stuff wrong with the below code).
Thanks for any help.
------------------------------
Dim oWord As Word.Application
Dim oDoc As Word.Document
Dim oTbl As Word.Table
Set oWord = CreateObject("word.application")
oWord.Visible = True
Set oDoc = oWord.Documents.Add("c:\filename.dot")
Set rngDoc = oDoc.Range(Start:=0, End:=0)
Set oTbl = oWord.Selection.Tables.Add(rngDoc, 1, 6)
I'm totally new to word vba but used to Access vba.
I'm opening af word document from Access and would like to insert a table
starting at a bookmark ("start").
However I can only find out how to put the table at the very beginning of
the document with range (rngDoc).
How do I start the table at the bookmark, "start" instead of at the
beginning of the document.
(There maybe other stuff wrong with the below code).
Thanks for any help.
------------------------------
Dim oWord As Word.Application
Dim oDoc As Word.Document
Dim oTbl As Word.Table
Set oWord = CreateObject("word.application")
oWord.Visible = True
Set oDoc = oWord.Documents.Add("c:\filename.dot")
Set rngDoc = oDoc.Range(Start:=0, End:=0)
Set oTbl = oWord.Selection.Tables.Add(rngDoc, 1, 6)