Visual Basic para Aplicaciones - activar varias paginas en una macro en word

Life is soft - evento anual de software empresarial
 
Vista:

activar varias paginas en una macro en word

Publicado por PACO (1 intervención) el 30/12/2011 18:17:04
hola, amigos programadores saben tengo un problema con mi programa. consiste en insertar imagenes en una tabla de datos pero solo me inserta las imagenes en la primera pagina, despues de la segunda ya no me la acepta se pierden las imagenes. PREGUNTA ¿como puedo activar dos o mas paginas dentro de mi documento word usando mi macro? .......el codigo es el siguiente:

Sub PICTURES()
'

'FOTO1
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO.JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=145, Top:=25, Width:=110, Height:=57
'FOTO2
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (1).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=25, Width:=106, Height:=57

'FOTO3
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (2).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=145, Top:=82, Width:=110, Height:=60
'FOTO4
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (3).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=82, Width:=106, Height:=60

'FOTO5
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (4).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=145, Top:=143, Width:=110, Height:=54
'FOTO6
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (5).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=143, Width:=106, Height:=54

'FOTO7
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (6).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=145, Top:=195, Width:=110, Height:=55
'FOTO8
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (7).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=195, Width:=106, Height:=55

'FOTO9
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (8).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=145, Top:=250, Width:=110, Height:=57
'FOTO10
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (9).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=250, Width:=106, Height:=57

'FOTO11
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (10).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=145, Top:=308, Width:=110, Height:=54
'FOTO12
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (11).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=308, Width:=106, Height:=54

'FOTO13
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (12).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=145, Top:=362, Width:=110, Height:=54
'FOTO14
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (13).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=362, Width:=106, Height:=54

'FOTO15
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (14).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=145, Top:=415, Width:=110, Height:=54
'FOTO16
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (15).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=415, Width:=106, Height:=54

'FOTO17
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (16).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=145, Top:=469, Width:=110, Height:=54
'FOTO18
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (17).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=469, Width:=106, Height:=54

'FOTO19
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (18).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=145, Top:=522, Width:=110, Height:=54

'FOTO20
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (19).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=522, Width:=106, Height:=54

'FOTO21
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (20).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=145, Top:=576, Width:=110, Height:=58
'FOTO22
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (21).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=576, Width:=106, Height:=58


'FOTO23
ActiveDocument.Shapes.AddPicture FileName:= _
"D:\My Pictures\FOTOS DE TBA´S\MACRO IMAGENES\FOTO (1).JPG", LinkToFile:= _
False, SaveWithDocument:=True, Left:=256, Top:=700, Width:=106, Height:=58

espero que me puedan ayudar, solo se ve hasta la foto 17.

saludos.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder