Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Marco to copy, open Notes and paste

Status
Not open for further replies.

teebird

Technical User
Dec 11, 2001
239
Is this possible?

I have a table in Word (2002)that I want to add a command button that when the button is clicked, a macro or VB code will run and carry out the following.

Select the table and copy
Select the email address in the table
Open new email (Lotus Notes)
Add email address to TO: field
Paste table into email message

Many thanks for any help.
 
Here are some thoughts:

Select the table and copy
For this, considering you want to paste to an external application, you may need to make an API call to the Windows Clipboard. There are tons of code examples on teh web for doing this, and some in tek-tips as well.

Select the email address in the table
Not sure exactly what you mean here, are you really saying that, dependent upon which email address is selected, or have the code select a particular email based on other criteria?

Open new email (Lotus Notes)
There should be a reference or two which would give you what you need. You could try searching the web for soemthing along the lines of "VBA Lotus Notes Email": I would think that would give good results, or you could just browse through the references with or without using the object browser.

Add email address to TO: field
You may be able to use the Lotus Notes reference to access this field, and set it equal to what is on the clipboard, or else just set a variable in your code equal to the email address, and then set the To: field in the new email equal to that variable.

Paste table into email message
This can probably be done the same as the "add email address to TO: field"


--

"If to err is human, then I must be some kind of human!" -Me
 
Notes email stuff you may be able to adapt into VBA in thread222-766157 (wiglaer's post)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top