- Add below macro to your Microsoft Word
- First merge the abstractbook
- After this, set the Page orientation to landscape
- Then run the EVWOpenImagesHTTPS macro
Sub EVWOpenImagesHTTPS()
'
' FileTest Macro
' Macro opgenomen op 20-1-2005 door Jaap Bakker
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
lExit = False
Do While lExit = False
With Selection.Find
.Text = "https://"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
If Selection.Find.Execute = True Then
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
cReadString = ""
cReadString = Trim(Mid(ActiveDocument.ActiveWindow.Selection.Text, 1, Len(ActiveDocument.ActiveWindow.Selection.Text) - 1))
cReadDoc = ""
cReadDoc = LCase(Mid(cReadString, Len(cReadString) - 2, 3))
If cReadDoc = "bmp" Or cReadDoc = "jpg" Or cReadDoc = "jpeg" Or cReadDoc = "png" Or cReadDoc = "gif" Then
Selection.InlineShapes.AddPicture FileName:=cReadString, LinkToFile:=False, SaveWithDocument:=True
Else
Selection.Find.Replacement.Text = "https:\\"
Selection.Find.Execute Replace:=wdReplaceOne
End If
Else
lExit = True
End If
Loop
' NU DE PICTURE TEKSTEN WEGHALEN EN DE LEGE CAPTION TEKSTEN WEGHALEN
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
lExit = False
Do While lExit = False
With Selection.Find
.Text = "Picture ?:"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
If Selection.Find.Execute = True Then
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.Find.Replacement.Text = ""
Selection.Find.Execute Replace:=wdReplaceOne
Else
lExit = True
End If
Loop
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
lExit = False
Do While lExit = False
With Selection.Find
.Text = "Caption ?:"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
If Selection.Find.Execute = True Then
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
cReadString = ""
cReadString = Trim(Mid(ActiveDocument.ActiveWindow.Selection.Text, 1, Len(ActiveDocument.ActiveWindow.Selection.Text) - 1))
Selection.Find.Replacement.Text = "Picture " + Mid(cReadString, 8, Len(cReadString) - 8)
Selection.Find.Execute Replace:=wdReplaceOne
Else
lExit = True
End If
Loop
End Sub
Comments
0 comments
Please sign in to leave a comment.