Option
Explicit
Private
Sub
Logo_einfuegen(Verz
As
String
, aDok
As
String
)
Dim
objDocument
As
Word.Document
Set
objDocument = Documents.Open(FileName:=aDok)
LogoBO = ThisDocument.Path &
"\Logo_BochumMVZ_18.jpg"
With
Selection.Find
.ClearFormatting
.Text =
"MVZ Labor Bochum MLB GmbH"
.Replacement.ClearFormatting
.Replacement.Text =
""
.Execute Replace:=wdReplaceAll, Forward:=
True
, _
Wrap:=wdFindContinue
End
With
Selection.Find.ClearFormatting
With
Selection.Find
.Text =
"MVZ Labor Bochum MLB GmbH"
.Replacement.Text =
""
.Forward =
True
.Wrap = wdFindContinue
.Format =
False
.MatchCase =
False
.MatchWholeWord =
False
.MatchWildcards =
False
.MatchSoundsLike =
False
.MatchAllWordForms =
False
End
With
Call
objDocument.InlineShapes.AddPicture(FileName:=LogoBO, LinkToFile:=
False
, SaveWithDocument:=
True
)
With
objDocument.InlineShapes(1)
.ScaleHeight = 50
.ScaleWidth = 50
End
With
Call
objDocument.Close(SaveChanges:=
True
)
Set
objDocument =
Nothing
End
Sub