I'm sorry, I must not have made my question clear.
When I'm actually writing the code in the IDE and I type "private _myvar as
string" I want to have a macro automatically generate
the Property get-set code. This question has nothing at all to do about
actually running the program. One way of doing this involves
copying the "private _myvar as string" line into the clipboard,
repositioning the cursor to where you want the property code to be, and
then running the macro that will copy the string in the clipboard into a
string variable and then process it... That is the genesis of my question
of "how do you get a string from the clipboard into a string variable in a
macro?"
John
"stand__sure" <st*********@hotmail.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
JohnR wrote: Hi all,
I'm finally sick and tired of manually generating get/set
properties for each private variable in a class so I'm trying to create a macro to
do it.
I'm stuck because I can't figure out how to get a string that is in
the clipboard into a variable in the macro. I tried this:
Dim x as string = DTE.ActiveDocument.Selection.Paste() thinking it
would "paste" the clipboard into the string variable X, but it just pasted
the string into the document.
Can somebody give me a code example that transfers the string in the
clipboard into a variable in the macro?
Thanks,
John
this defeats the purpose of having private member variables -- the idea
is to perform some sort of testing in the "set". if this is not
necessary, then make the variable public and be done with it...