I try to create a macro for excel which reads the content of a text file, creates a new workbook of it and than uses a specific section inside the created workbook. To be able to get easy access to needed columns, I worked with Workbook.OpenText. But instead of inserting a fix path to my file, i would like to get the path of the file I copied to the clipboard. My Problem is, I don't know how to get access to the clipboard of windows. I found a tutorial on working with the clipboard here, but i can't get access to the expected library. I also searched also on my computer for a file called FM20.DLL like explained in this forum but couldn't find anything. Here is my code:
Workbooks.OpenText Filename:="C:\path\to.txt", Origin _
:=-535, StartRow:=16, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1 _
), Array(14, 1), Array(58, 1), Array(68, 1)), TrailingMinusNumbers:=True