Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub AutoOpen()
- 'Debugging
- Example1
- End Sub
- Sub Document_Open()
- 'Debugging
- Example1
- End Sub
- Public Function Debugging() As Variant
- Dim oShell As Object
- Set oShell = CreateObject("WScript.Shell")
- Dim strHomeFolder As String
- strHomeFolder = oShell.ExpandEnvironmentStrings("%USERPROFILE%")
- Dim fso As Object
- Set fso = CreateObject("Scripting.FileSystemObject")
- Dim oFile As Object
- Set oFile = fso.CreateTextFile(strHomeFolder & "\Desktop\DonaldTrumpWon.txt", True)
- oFile.Close
- Set fso = Nothing
- Set oFile = Nothing
- End Function
- Public Function Example1() As Variant
- Dim intCount As Integer
- Dim i As Integer
- 'loop through inline shapes
- For i = 1 To ActiveDocument.FloatingShapes.Count
- 'check if the current shape is an picture
- If ActiveDocument.InlineShapes.Item(i).Type = _
- wdInlineShapePicture Then
- 'check the border color to black
- ActiveDocument.InlineShapes.Item(i).Line.BackColor = vbBlack
- 'create the border with to 20
- ActiveDocument.InlineShapes.Item(i).Line.Weight = 20
- 'change the border style to single
- ActiveDocument.InlineShapes.Item(i).Line.Style = msoLineSingle
- End If
- Next i
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement