Hello All,
I need some help to convert the macro I recorded in Excel into a working Vb.Net application. It involves attaching a file into a Excel cell. The file is a Word document named "File.doc". Here's the recorded macro:
Sub DemoAttachFile()
Workbooks("Book1").Activate
Sheets("Sheet1").Select
Range("B2").Select
ActiveSheet.OLEObjects.Add(Filename:= _
"C:\Documents and Settings\File.doc", _
Link:=False, _
DisplayAsIcon:=True, _
IconFileName:="C:\WINNT\Installer\{90110409-6000-11D3-8CFE-0150048383C9}\wordicon.exe", _
IconIndex:=0, _
IconLabel:="C:\Documents and Settings\File.doc" _
).Select
Selection.ShapeRange.ScaleWidth 0.45, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 0.45, msoFalse, msoScaleFromTopLeft
End Sub
Thank you in advance.
Cheers, Dor (student)