Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Const sPic As String = "C:\Documents and Settings\Admin\My Documents\My Pictures\logo\hills.jpg"
'Const sPic As String = "G:\Templates\wstmmm1.gif" 'deze is voor jou!
Const sBm As String = "bmPic"
Sub Logo()
Dim oSec As Word.Section
Dim oHead As Word.HeaderFooter
Dim oShape As Word.Shape
Dim iCnt As Integer
Dim sName As String
If Documents.Count = 0 Then Exit Sub
Application.ScreenUpdating = False
For Each oSec In ActiveDocument.Sections
If oSec.Index > 0 And oSec.Index <= ActiveDocument.Sections.Count Then
For Each oHead In oSec.Headers
Set oShape = oHead.Shapes.AddPicture(sPic)
With oShape
.Name = CStr("Pic" & iCnt)
.LockAspectRatio = msoTrue
.Height = 83.35
.Width = 197.85
.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
.RelativeVerticalPosition = wdRelativeVerticalPositionPage
.Left = CentimetersToPoints(1.5)
.Top = CentimetersToPoints(1)
.WrapFormat.AllowOverlap = True
.WrapFormat.Side = wdWrapBoth
.WrapFormat.DistanceTop = CentimetersToPoints(0)
.WrapFormat.DistanceBottom = CentimetersToPoints(0)
.WrapFormat.DistanceRight = CentimetersToPoints(0.32)
.WrapFormat.Type = wdWrapTight
End With
iCnt = iCnt + 1
Next
End If
Next
Set oShape = Nothing
End Sub
Sub DeleteLogo()
Dim oSec1 As Word.Section
Dim oHead1 As Word.HeaderFooter
Dim oShape1 As Word.Shape
If Documents.Count = 0 Then Exit Sub
Application.ScreenUpdating = False
For Each oSec1 In ActiveDocument.Sections
If oSec1.Index > 0 And oSec1.Index <= ActiveDocument.Sections.Count Then
For Each oHead1 In oSec1.Headers
For Each oShape1 In oHead1.Shapes
If Left(oShape1.Name, 3) = "Pic" Then
oShape1.Delete
End If
Next
Next
End If
Next
End Sub
Kijk dat horen we graag!Geplaatst door ceebee
:thumb: Het werkt als een speer:thumb:
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.