Bonjour,
lorsque je lance l'enregistreur de macro de word, pour inserer
dans la page blance un filigrane ("mise en page" + "filigrane" +
"filigrane perso")
j'obtiens le code ci-après.
En fait, mon filigrane personnalisé (ici "monsieur toto") est
dans une liste de ma feuille excel.
J'aimerai donc, ouvrir word, et pour chaque noms
de la feuille (de [A2:A50] par exemple) :
- créer la page vierge word et y inserer le filigrane de Ax
- exporter en PDF la feuille
Merci pour votre aide.
José
'************
Sub Macro3()
'
' Macro3 Macro
'
'
ActiveDocument.Sections(1).Range.Select
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.Shapes.AddTextEffect( _
PowerPlusWaterMarkObject2082223235, "monsieur toto", "Times
New Roman", 1, _
False, False, 0, 0).Select
Selection.ShapeRange.Name = "PowerPlusWaterMarkObject2082223235"
Selection.ShapeRange.TextEffect.NormalizedHeight = False
Selection.ShapeRange.Line.Visible = False
Selection.ShapeRange.Fill.Visible = True
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RVB(192, 192, 192)
Selection.ShapeRange.Fill.Transparency = 0.5
Selection.ShapeRange.Rotation = 315
Selection.ShapeRange.LockAspectRatio = True
Selection.ShapeRange.Height = CentimetersToPoints(3.47)
Selection.ShapeRange.Width = CentimetersToPoints(19.09)
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapNone
Selection.ShapeRange.WrapFormat.Type = 3
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeVerticalPositionMargin
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionMargin
Selection.ShapeRange.Left = wdShapeCenter
Selection.ShapeRange.Top = wdShapeCenter
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
"C:Usersd40442DocumentsLiberKeyAppsPDFTKBuilderApp
PDFTKBuildermonsieur toto.pdf" _
, ExportFormat:=wdExportFormatPDF, OpenAfterExport:=True,
OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:= 1,
To:=1, _
Item:=wdExportDocumentContent, IncludeDocProps:=True,
KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks,
DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:úlse
End Sub
'************
Bonjour,
lorsque je lance l'enregistreur de macro de word, pour inserer
dans la page blance un filigrane ("mise en page" + "filigrane" +
"filigrane perso")
j'obtiens le code ci-après.
En fait, mon filigrane personnalisé (ici "monsieur toto") est
dans une liste de ma feuille excel.
J'aimerai donc, ouvrir word, et pour chaque noms
de la feuille (de [A2:A50] par exemple) :
- créer la page vierge word et y inserer le filigrane de Ax
- exporter en PDF la feuille
Merci pour votre aide.
José
'************
Sub Macro3()
'
' Macro3 Macro
'
'
ActiveDocument.Sections(1).Range.Select
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.Shapes.AddTextEffect( _
PowerPlusWaterMarkObject2082223235, "monsieur toto", "Times
New Roman", 1, _
False, False, 0, 0).Select
Selection.ShapeRange.Name = "PowerPlusWaterMarkObject2082223235"
Selection.ShapeRange.TextEffect.NormalizedHeight = False
Selection.ShapeRange.Line.Visible = False
Selection.ShapeRange.Fill.Visible = True
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RVB(192, 192, 192)
Selection.ShapeRange.Fill.Transparency = 0.5
Selection.ShapeRange.Rotation = 315
Selection.ShapeRange.LockAspectRatio = True
Selection.ShapeRange.Height = CentimetersToPoints(3.47)
Selection.ShapeRange.Width = CentimetersToPoints(19.09)
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapNone
Selection.ShapeRange.WrapFormat.Type = 3
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeVerticalPositionMargin
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionMargin
Selection.ShapeRange.Left = wdShapeCenter
Selection.ShapeRange.Top = wdShapeCenter
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
"C:Usersd40442DocumentsLiberKeyAppsPDFTKBuilderApp
PDFTKBuildermonsieur toto.pdf" _
, ExportFormat:=wdExportFormatPDF, OpenAfterExport:=True,
OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:= 1,
To:=1, _
Item:=wdExportDocumentContent, IncludeDocProps:=True,
KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks,
DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False
End Sub
'************
Bonjour,
lorsque je lance l'enregistreur de macro de word, pour inserer
dans la page blance un filigrane ("mise en page" + "filigrane" +
"filigrane perso")
j'obtiens le code ci-après.
En fait, mon filigrane personnalisé (ici "monsieur toto") est
dans une liste de ma feuille excel.
J'aimerai donc, ouvrir word, et pour chaque noms
de la feuille (de [A2:A50] par exemple) :
- créer la page vierge word et y inserer le filigrane de Ax
- exporter en PDF la feuille
Merci pour votre aide.
José
'************
Sub Macro3()
'
' Macro3 Macro
'
'
ActiveDocument.Sections(1).Range.Select
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.Shapes.AddTextEffect( _
PowerPlusWaterMarkObject2082223235, "monsieur toto", "Times
New Roman", 1, _
False, False, 0, 0).Select
Selection.ShapeRange.Name = "PowerPlusWaterMarkObject2082223235"
Selection.ShapeRange.TextEffect.NormalizedHeight = False
Selection.ShapeRange.Line.Visible = False
Selection.ShapeRange.Fill.Visible = True
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RVB(192, 192, 192)
Selection.ShapeRange.Fill.Transparency = 0.5
Selection.ShapeRange.Rotation = 315
Selection.ShapeRange.LockAspectRatio = True
Selection.ShapeRange.Height = CentimetersToPoints(3.47)
Selection.ShapeRange.Width = CentimetersToPoints(19.09)
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapNone
Selection.ShapeRange.WrapFormat.Type = 3
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeVerticalPositionMargin
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionMargin
Selection.ShapeRange.Left = wdShapeCenter
Selection.ShapeRange.Top = wdShapeCenter
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
"C:Usersd40442DocumentsLiberKeyAppsPDFTKBuilderApp
PDFTKBuildermonsieur toto.pdf" _
, ExportFormat:=wdExportFormatPDF, OpenAfterExport:=True,
OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:= 1,
To:=1, _
Item:=wdExportDocumentContent, IncludeDocProps:=True,
KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks,
DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:úlse
End Sub
'************
Alfred WALLACE a écrit, le 09/06/2011 12:06 :
> Bonjour,
> lorsque je lance l'enregistreur de macro de word, pour inserer
> dans la page blance un filigrane ("mise en page" + "filigrane" +
> "filigrane perso")
> j'obtiens le code ci-après.
> En fait, mon filigrane personnalisé (ici "monsieur toto") est
> dans une liste de ma feuille excel.
> J'aimerai donc, ouvrir word, et pour chaque noms
> de la feuille (de [A2:A50] par exemple) :
> - créer la page vierge word et y inserer le filigrane de Ax
> - exporter en PDF la feuille
> Merci pour votre aide.
> José
> '************
> Sub Macro3()
> '
> ' Macro3 Macro
> '
> '
> ActiveDocument.Sections(1).Range.Select
> ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageH eader
> Selection.HeaderFooter.Shapes.AddTextEffect( _
> PowerPlusWaterMarkObject2082223235, "monsieur toto", "Times
> New Roman", 1, _
> False, False, 0, 0).Select
> Selection.ShapeRange.Name = "PowerPlusWaterMarkObject20822 23235"
> Selection.ShapeRange.TextEffect.NormalizedHeight = False
> Selection.ShapeRange.Line.Visible = False
> Selection.ShapeRange.Fill.Visible = True
> Selection.ShapeRange.Fill.Solid
> Selection.ShapeRange.Fill.ForeColor.RGB = RVB(192, 192, 19 2)
> Selection.ShapeRange.Fill.Transparency = 0.5
> Selection.ShapeRange.Rotation = 315
> Selection.ShapeRange.LockAspectRatio = True
> Selection.ShapeRange.Height = CentimetersToPoints(3.47)
> Selection.ShapeRange.Width = CentimetersToPoints(19.09)
> Selection.ShapeRange.WrapFormat.AllowOverlap = True
> Selection.ShapeRange.WrapFormat.Side = wdWrapNone
> Selection.ShapeRange.WrapFormat.Type = 3
> Selection.ShapeRange.RelativeHorizontalPosition = _
> wdRelativeVerticalPositionMargin
> Selection.ShapeRange.RelativeVerticalPosition = _
> wdRelativeVerticalPositionMargin
> Selection.ShapeRange.Left = wdShapeCenter
> Selection.ShapeRange.Top = wdShapeCenter
> ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
> ActiveDocument.ExportAsFixedFormat OutputFileName:= _
> "C:Usersd40442DocumentsLiberKeyAppsPDFTKBuilde rApp
> PDFTKBuildermonsieur toto.pdf" _
> , ExportFormat:=wdExportFormatPDF, OpenAfterExport :=True,
> OptimizeFor:= _
> wdExportOptimizeForPrint, Range:=wdExportAllDocume nt, From:=1,
> To:=1, _
> Item:=wdExportDocumentContent, IncludeDocProps:= True,
> KeepIRM:=True, _
> CreateBookmarks:=wdExportCreateNoBookmarks,
> DocStructureTags:=True, _
> BitmapMissingFonts:=True, UseISO19005_1:úlse
> End Sub
> '************
Bonjour,
J'imagine que cette question est rendue obsolète par la solution trouv ée
avec PDFtK ?
Alfred WALLACE a écrit, le 09/06/2011 12:06 :
> Bonjour,
> lorsque je lance l'enregistreur de macro de word, pour inserer
> dans la page blance un filigrane ("mise en page" + "filigrane" +
> "filigrane perso")
> j'obtiens le code ci-après.
> En fait, mon filigrane personnalisé (ici "monsieur toto") est
> dans une liste de ma feuille excel.
> J'aimerai donc, ouvrir word, et pour chaque noms
> de la feuille (de [A2:A50] par exemple) :
> - créer la page vierge word et y inserer le filigrane de Ax
> - exporter en PDF la feuille
> Merci pour votre aide.
> José
> '************
> Sub Macro3()
> '
> ' Macro3 Macro
> '
> '
> ActiveDocument.Sections(1).Range.Select
> ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageH eader
> Selection.HeaderFooter.Shapes.AddTextEffect( _
> PowerPlusWaterMarkObject2082223235, "monsieur toto", "Times
> New Roman", 1, _
> False, False, 0, 0).Select
> Selection.ShapeRange.Name = "PowerPlusWaterMarkObject20822 23235"
> Selection.ShapeRange.TextEffect.NormalizedHeight = False
> Selection.ShapeRange.Line.Visible = False
> Selection.ShapeRange.Fill.Visible = True
> Selection.ShapeRange.Fill.Solid
> Selection.ShapeRange.Fill.ForeColor.RGB = RVB(192, 192, 19 2)
> Selection.ShapeRange.Fill.Transparency = 0.5
> Selection.ShapeRange.Rotation = 315
> Selection.ShapeRange.LockAspectRatio = True
> Selection.ShapeRange.Height = CentimetersToPoints(3.47)
> Selection.ShapeRange.Width = CentimetersToPoints(19.09)
> Selection.ShapeRange.WrapFormat.AllowOverlap = True
> Selection.ShapeRange.WrapFormat.Side = wdWrapNone
> Selection.ShapeRange.WrapFormat.Type = 3
> Selection.ShapeRange.RelativeHorizontalPosition = _
> wdRelativeVerticalPositionMargin
> Selection.ShapeRange.RelativeVerticalPosition = _
> wdRelativeVerticalPositionMargin
> Selection.ShapeRange.Left = wdShapeCenter
> Selection.ShapeRange.Top = wdShapeCenter
> ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
> ActiveDocument.ExportAsFixedFormat OutputFileName:= _
> "C:Usersd40442DocumentsLiberKeyAppsPDFTKBuilde rApp
> PDFTKBuildermonsieur toto.pdf" _
> , ExportFormat:=wdExportFormatPDF, OpenAfterExport :=True,
> OptimizeFor:= _
> wdExportOptimizeForPrint, Range:=wdExportAllDocume nt, From:=1,
> To:=1, _
> Item:=wdExportDocumentContent, IncludeDocProps:= True,
> KeepIRM:=True, _
> CreateBookmarks:=wdExportCreateNoBookmarks,
> DocStructureTags:=True, _
> BitmapMissingFonts:=True, UseISO19005_1:=False
> End Sub
> '************
Bonjour,
J'imagine que cette question est rendue obsolète par la solution trouv ée
avec PDFtK ?
Alfred WALLACE a écrit, le 09/06/2011 12:06 :
> Bonjour,
> lorsque je lance l'enregistreur de macro de word, pour inserer
> dans la page blance un filigrane ("mise en page" + "filigrane" +
> "filigrane perso")
> j'obtiens le code ci-après.
> En fait, mon filigrane personnalisé (ici "monsieur toto") est
> dans une liste de ma feuille excel.
> J'aimerai donc, ouvrir word, et pour chaque noms
> de la feuille (de [A2:A50] par exemple) :
> - créer la page vierge word et y inserer le filigrane de Ax
> - exporter en PDF la feuille
> Merci pour votre aide.
> José
> '************
> Sub Macro3()
> '
> ' Macro3 Macro
> '
> '
> ActiveDocument.Sections(1).Range.Select
> ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageH eader
> Selection.HeaderFooter.Shapes.AddTextEffect( _
> PowerPlusWaterMarkObject2082223235, "monsieur toto", "Times
> New Roman", 1, _
> False, False, 0, 0).Select
> Selection.ShapeRange.Name = "PowerPlusWaterMarkObject20822 23235"
> Selection.ShapeRange.TextEffect.NormalizedHeight = False
> Selection.ShapeRange.Line.Visible = False
> Selection.ShapeRange.Fill.Visible = True
> Selection.ShapeRange.Fill.Solid
> Selection.ShapeRange.Fill.ForeColor.RGB = RVB(192, 192, 19 2)
> Selection.ShapeRange.Fill.Transparency = 0.5
> Selection.ShapeRange.Rotation = 315
> Selection.ShapeRange.LockAspectRatio = True
> Selection.ShapeRange.Height = CentimetersToPoints(3.47)
> Selection.ShapeRange.Width = CentimetersToPoints(19.09)
> Selection.ShapeRange.WrapFormat.AllowOverlap = True
> Selection.ShapeRange.WrapFormat.Side = wdWrapNone
> Selection.ShapeRange.WrapFormat.Type = 3
> Selection.ShapeRange.RelativeHorizontalPosition = _
> wdRelativeVerticalPositionMargin
> Selection.ShapeRange.RelativeVerticalPosition = _
> wdRelativeVerticalPositionMargin
> Selection.ShapeRange.Left = wdShapeCenter
> Selection.ShapeRange.Top = wdShapeCenter
> ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
> ActiveDocument.ExportAsFixedFormat OutputFileName:= _
> "C:Usersd40442DocumentsLiberKeyAppsPDFTKBuilde rApp
> PDFTKBuildermonsieur toto.pdf" _
> , ExportFormat:=wdExportFormatPDF, OpenAfterExport :=True,
> OptimizeFor:= _
> wdExportOptimizeForPrint, Range:=wdExportAllDocume nt, From:=1,
> To:=1, _
> Item:=wdExportDocumentContent, IncludeDocProps:= True,
> KeepIRM:=True, _
> CreateBookmarks:=wdExportCreateNoBookmarks,
> DocStructureTags:=True, _
> BitmapMissingFonts:=True, UseISO19005_1:úlse
> End Sub
> '************
Bonjour,
J'imagine que cette question est rendue obsolète par la solution trouv ée
avec PDFtK ?
Set Dc = Wd.Documents.new
Wd.Visible = True
'Reste de la macro
'Traitement du fichier word
'CETTE MACRO EST TIREE DE L'ENREGISTREUR DE MACRO DE WORD
'j'ai seulement rajouter le "Wd." devant chaque appel pour (je
pensais) bien faire référence
'à l'objet word crée plus haut.
Wd.Documents.Add Template:="Normal", NewTemplate:úlse,
DocumentType:=0
Set Dc = Wd.Documents.new
Wd.Visible = True
'Reste de la macro
'Traitement du fichier word
'CETTE MACRO EST TIREE DE L'ENREGISTREUR DE MACRO DE WORD
'j'ai seulement rajouter le "Wd." devant chaque appel pour (je
pensais) bien faire référence
'à l'objet word crée plus haut.
Wd.Documents.Add Template:="Normal", NewTemplate:=False,
DocumentType:=0
Set Dc = Wd.Documents.new
Wd.Visible = True
'Reste de la macro
'Traitement du fichier word
'CETTE MACRO EST TIREE DE L'ENREGISTREUR DE MACRO DE WORD
'j'ai seulement rajouter le "Wd." devant chaque appel pour (je
pensais) bien faire référence
'à l'objet word crée plus haut.
Wd.Documents.Add Template:="Normal", NewTemplate:úlse,
DocumentType:=0
Hello, je t'invite à comparer ce qui apparaît au début et à la fi n de
ceci :)
Est-ce bien normal ?
Je ne suis pas trop entré dans le reste, ça demande de bien se
concentrer, mais déjà sur ce point je trouve que ça mérite d'êt re sûr.
_____________________________________________
Alfred WALLACE a écrit, le 14/06/2011 11:22 :
> Set Dc = Wd.Documents.new
> Wd.Visible = True
> 'Reste de la macro
> 'Traitement du fichier word
> 'CETTE MACRO EST TIREE DE L'ENREGISTREUR DE MACRO DE WORD
> 'j'ai seulement rajouter le "Wd." devant chaque appel pour (je
> pensais) bien faire référence
> 'à l'objet word crée plus haut.
> Wd.Documents.Add Template:="Normal", NewTemplate:úlse,
> DocumentType:=0
Hello, je t'invite à comparer ce qui apparaît au début et à la fi n de
ceci :)
Est-ce bien normal ?
Je ne suis pas trop entré dans le reste, ça demande de bien se
concentrer, mais déjà sur ce point je trouve que ça mérite d'êt re sûr.
_____________________________________________
Alfred WALLACE a écrit, le 14/06/2011 11:22 :
> Set Dc = Wd.Documents.new
> Wd.Visible = True
> 'Reste de la macro
> 'Traitement du fichier word
> 'CETTE MACRO EST TIREE DE L'ENREGISTREUR DE MACRO DE WORD
> 'j'ai seulement rajouter le "Wd." devant chaque appel pour (je
> pensais) bien faire référence
> 'à l'objet word crée plus haut.
> Wd.Documents.Add Template:="Normal", NewTemplate:=False,
> DocumentType:=0
Hello, je t'invite à comparer ce qui apparaît au début et à la fi n de
ceci :)
Est-ce bien normal ?
Je ne suis pas trop entré dans le reste, ça demande de bien se
concentrer, mais déjà sur ce point je trouve que ça mérite d'êt re sûr.
_____________________________________________
Alfred WALLACE a écrit, le 14/06/2011 11:22 :
> Set Dc = Wd.Documents.new
> Wd.Visible = True
> 'Reste de la macro
> 'Traitement du fichier word
> 'CETTE MACRO EST TIREE DE L'ENREGISTREUR DE MACRO DE WORD
> 'j'ai seulement rajouter le "Wd." devant chaque appel pour (je
> pensais) bien faire référence
> 'à l'objet word crée plus haut.
> Wd.Documents.Add Template:="Normal", NewTemplate:úlse,
> DocumentType:=0
Gloops,
merci pour ton aide, je vois que tu me suis à la trace ! :-)
Ceci dit, non, je répete il y a bien 2 choses et donc 2 questions
différentes.
désolé c'est vrai que mes messages sont assez (trop) longs
mais, je ne vois pas comment expliquer mon soucis sans décrire
ce qui ce passe.
Gloops,
merci pour ton aide, je vois que tu me suis à la trace ! :-)
Ceci dit, non, je répete il y a bien 2 choses et donc 2 questions
différentes.
désolé c'est vrai que mes messages sont assez (trop) longs
mais, je ne vois pas comment expliquer mon soucis sans décrire
ce qui ce passe.
Gloops,
merci pour ton aide, je vois que tu me suis à la trace ! :-)
Ceci dit, non, je répete il y a bien 2 choses et donc 2 questions
différentes.
désolé c'est vrai que mes messages sont assez (trop) longs
mais, je ne vois pas comment expliquer mon soucis sans décrire
ce qui ce passe.