Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub test()
'
' test Macro
' Macro recorded 11-04-2008 by Hans Bolten
'
Selection.InlineShapes.AddOLEObject ClassType:="AcroExch.Document.7", _
FileName:= _
"R:\SEM\Analyseresultaten\2008.1383\2008.1383 location a.pdf", _
LinkToFile:=False, DisplayAsIcon:=True, IconFileName:= _
"C:\WINDOWS\Installer\{AC76BA86-7AD7-1033-7B44-A70900000002}\PDFFile.ico" _
, IconIndex:=0, IconLabel:="2008.1383 location a.pdf"
End Sub
Sub InsertObject1()
Dim FoundFile As Variant
Dim vName As Variant
'create FileDialog object as File Picker dialog box
With Application.FileDialog(FileDialogType:=msoFileDialogFilePicker)
'use Show method to display File Picker dialog box and return user's action
If .Show = -1 Then
'step through each string in the FileDialogSelectedItems collection
For Each FoundFile In .SelectedItems
vName = FoundFile 'gets new filepath
Selection.InlineShapes.AddOLEObject FileName:=vName, LinkToFile:=False, _
DisplayAsIcon:=True, IconLabel:=Split(vName, "\")(UBound(Split(vName, "\")))
Next
End If
End With
End Sub
Sub InsertObject2()
Dim FoundFile As Variant
Dim vName As Variant
Dim strName As String
'create FileDialog object as File Picker dialog box
With Application.FileDialog(FileDialogType:=msoFileDialogFilePicker)
'use Show method to display File Picker dialog box and return user's action
If .Show = -1 Then
'step through each string in the FileDialogSelectedItems collection
For Each FoundFile In .SelectedItems
vName = FoundFile 'gets new filepath
strName = Split(vName, "\")(UBound(Split(vName, "\")))
strName = Left(strName, Len(strName) - 4)
Selection.InlineShapes.AddOLEObject FileName:=vName, LinkToFile:=False, _
DisplayAsIcon:=True, IconLabel:=strName
Next
End If
End With
End Sub
Selection.InlineShapes.AddOLEObject FileName:=vName, LinkToFile:=False, _
DisplayAsIcon:=True, IconLabel:=strName
On Error GoTo Alternate
Selection.InlineShapes.AddOLEObject FileName:=vName, LinkToFile:=False, _
DisplayAsIcon:=True, IconLabel:=strName
GoTo NextShape
Alternate:
Selection.InlineShapes.AddOLEObject ClassType:="Package", FileName:=vName, _
LinkToFile:=False, DisplayAsIcon:=True, IconLabel:=strName
NextShape: