Buenos Días a los Integrantes de este foro:
 
Reciban un cordial saludo, hoy como siempre acudiendo a sus conocimientos y su ayuda profesional, estoy usando office 2010 creado un archivo de word desde excel usando, visual basic excel, logre crear el archivo, pero resulta que le voy a crear tablas en diferentes partes del documento de word pero no me lo permite o la crea al inicio o al final del documento, y la verdad no se como posicionarla en donde la estoy creando, tengo el siguiente codigo:
 
Private Sub gen_arc_word_Click()
    Dim wordapp As Word.Application
    Dim fs As FileSystemObject
    Dim documento As Document, objselection As Selection
    Dim camino As String
    Dim fila, i As Integer
    Dim oDoc As Word.Document
    Dim parrf As Integer
    parrf = 1
    Set wordapp = New Word.Application
    Set fs = New FileSystemObject
    Dim ctd_core As Integer
        ctd_core = Range("B3").Value
        Range("A2").Select
        'contar filas
        fila = Cells(Rows.Count, 1).End(xlUp).Row
    Dim nom_arch, fecha, dia, aula As String
        nom_arch = Range("B1").Value
    Set documento = wordapp.Documents.Add
    Set objselection = wordapp.Selection
    With objselection.Sections(1)
        .Headers(wdHeaderFooterPrimary).Range.InlineShapes  .AddPicture Filename:=Sheets("configuracion").Range("B2").Valu  e, LinkToFile:=False, SaveWithDocument:=True
        .Footers(wdHeaderFooterPrimary).PageNumbers.Add PageNumberAlignment:=wdAlignPageNumberCenter
    End With
 
objselection.InsertNewPage
        objselection.InlineShapes.AddPicture ("C:\Users\user\Desktop\prueba.png")
        objselection.Collapse Direction:=wdCollapseEnd
        objselection.InsertParagraph
 
// aqui viene el tema 
 
objselection = documento.Range()
Set objRange = documento.Paragraphs(3).Range
            objRange.MoveEnd Unit:=wdCharacter, Count:=-1
            objRange.Collapse Direction:=wdCollapseEnd
objselection.Tables.Add Range:=objRange, NumRows:=2, NumColumns:=3
           objselection.TypeText Sheets("configuracion").Range("H10").Value
Range("a1").Select
camino = ThisWorkbook.Path & " " & nom_arch
documento.SaveAs Filename:=nom_arch & ".doc", _
FileFormat:=wdFormatDocument
documento.Close savechanges:=True
MsgBox (nom_arch & ".doc")
wordapp.Application.Quit
Set fs = Nothing
Set objselection = Nothing
Set documento = Nothing
Set wordapp = Nothing
 
End Sub
 
De antemano les agradezco su ayuda y su atención.
 
Atentamente;
 
 
OSWALDO GAITAN ARAQUE
Bendiciones!! 
   
 


