+ Reply to Thread
Results 1 to 19 of 19

Changing VBA code from Outlook to Lotus Notes

  1. #1
    Registered User
    Join Date
    01-09-2008
    Posts
    17

    Changing VBA code from Outlook to Lotus Notes

    Hi All,

    I would appreciate some expertise on this issue.

    I have the following code from Ron De Bruin's website (http://www.rondebruin.nl/mail/folder3/message.htm) for emailing a small message from a range.

    Please Login or Register  to view this content.
    I'm ok editing the code to fit in with the spreadsheet I wish to apply it to but the problem I have is that our company uses Lotus Notes (v7) and I have no idea how to amend the code to work with Notes.

    Any help anyone can offer would be greatly appreciated.

    Tom

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning tommytee

    You're better off starting from scratch to be honest. This code should get you started to send a straight forward e-mail - just amend it to suit. I don't have access to Notes 7, but have tested it on Notes 6.5. I would be interested in confirmation that it works OK on the latest version.

    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    01-09-2008
    Posts
    17
    Hi Dominic,

    Thanks for your prompt reply. Let me firstly apologise as I am a novice in this area at the moment but I'm not sure this is exactly what I need. (I'm apologising because I could be wrong!)

    The basic situation is thus:

    I will have a list of contacts (A:A) with email addresses (B:B) and the idea was to have check box linked to cells in C:C and then based on the 'True' or 'False' value in cell C, open a separate message for each inidividual.

    This will be partly a manual process, i.e. an administrator will decide who needs to receive an email based on other information within the spreadsheet and check the boxes accordingly, then run the code to execute this.

    I hope this makes sense and thanks again

    Tom

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi tommytee

    Firstly, will you check that the code above works - do this by finding the cells where comments are added and add a body, a header, and an addressee and just run the code to make sure that this code works OK on Notes 7.

    Then let me know where the body of the e-mail will be, and where the header will be, perhaps providing a cut down version of what you have at the moment. Also, I'm guessing that the "contact" in column A is to be the salutation (eg Dear tommytee etc)?

    HTH

    DominicB

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You will probably find it easier to just put a x in column C & use the code to check for that value instead of checkboxes. Alternatively, you can format C to Marlett Font & use "a" to get a check mark.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Registered User
    Join Date
    01-09-2008
    Posts
    17
    Hi Dominic,

    Exciting stuff! The code works fine in Notes 7. Really good stuff thanks

    The only thing I would say is that there will definitely be no attachment and I would probably like to open the emails to be checked rather than immediately sent (altho that is very cool).

    The body text would be something along the lines of;

    Dear 'Salutation'

    Your Contract is due to expire on 'Date'

    Please let me know if you would like to renew to 'Date2' as soon as possible..

    With my limited knowledge, I imagine the text that will remain constant can be contained within the code and the specifics in bold kept on the spreadsheet and pulled through from there?

    I've attached up a basic template of what kind of data fields will be there. You will see that there is a manager email too. I will also need the option to email these guys as well with slightly different text in the email body.

    I hope this makes sense

    Cheers

    Tom
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-09-2008
    Posts
    17
    Thanks Roy,

    My intention was to link the check box to each cell to return a TRUE/FALSE and reference that in the code, but I'm not sure if thats the best way.

    Tom

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Quote Originally Posted by tommytee View Post
    Thanks Roy,

    My intention was to link the check box to each cell to return a TRUE/FALSE and reference that in the code, but I'm not sure if thats the best way.

    Tom
    I think you will find it simpler to do what I suggested. Check the example, double click any cell in column C to add the check (tick), remove it if not required. Code is in the Worksheet module.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-09-2008
    Posts
    17
    Hi Roy,

    Thanks for that code - top notch!

    I'll definitely use that

    Tom

  10. #10
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi tommytee

    Roy's suggestion would be easier than to create 500 tick boxes : that said the example I have used utilises a tick box, as I have only one row to cater for. If you want to go for Roy's example, no great changes will be required.

    To kick the thing off in your example you will need to run the macro "BuildMessage" which will loop through all rows and send an e-mail based on the information in the sheet where column N says True.

    I am looking into saving the resultiung e-mail into drafts, but this is not quite as simple as it would be in Outlook. Unsurprisingly, Notes doesn't integrate into Office quite as well as Microsoft products do - in fact it is the command
    Please Login or Register  to view this content.
    which places the mail into the sent folder, so it's not quite as straightforward as one might think.

    HTH

    DominicB
    Attached Files Attached Files

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Hi Dominic, does Notes not have a .Show command or similar?

  12. #12
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Quote Originally Posted by royUK View Post
    Hi Dominic, does Notes not have a .Show command or similar?
    Thanks for the thought Roy, but unfortunately, but the .Show command (and is there also a .Display command?) are unsupported, however I've found a .Save instruction that seems to work with a slight syntax tweak, so TommyTee in the macro replace this line :
    Please Login or Register  to view this content.
    with this :
    Please Login or Register  to view this content.
    to get the unsent mail to go to your Drafts folder for review.

    HTH

    DominicB

  13. #13
    Registered User
    Join Date
    01-09-2008
    Posts
    17
    That's amazing.

    I've tweaked a bit of the text but its really starting to look like what I wanted so many thanks for your helps guys.

    I was just trying to use Roy's code for double clicking but can't seem to get it to work in the test sheet. I wanted to change it to column A aswell but couldn't see how to do it.

    Cheers

    Tom

  14. #14
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi tommytee
    Quote Originally Posted by tommytee View Post
    I was just trying to use Roy's code for double clicking but can't seem to get it to work in the test sheet. I wanted to change it to column A aswell but couldn't see how to do it.
    Not quite sure what you mean, but if you're really struggling feel free to upload a small sample of where you're up to and someone will try and help you out.

    DominicB

  15. #15
    Registered User
    Join Date
    01-09-2008
    Posts
    17
    Ok,

    This is the original code from Roy

    Please Login or Register  to view this content.
    All I did was paste it into the test spreadsheet module below everything else but I couldn't work out how it actually works! I couldn't see how it was limited to column C (as the 'limit action to C' was just a label I think)

    Also do I need to use a separate module?

    Thanks

    Tom

  16. #16
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi tommytee

    The modules I supplied are standard modules - they don't run until you ask them to. The module that Roy supplied is an "event procedure" - it runs whenever a predefined event takes place, in this case before a double click happens (look at the title of the macro ...) As such it needs to be placed in a special module, behind sheet 1. Have another look at the book Roy uploaded and you'll see what I mean.

    Please Login or Register  to view this content.
    The line preceded with a ' is indeed a comment, however the next line does the gritty work : If Target (the cell you're in) .Column (grab the column number) <> (doesn't equal) 3 (column C) Then Exit Sub(bail out). If you want this to be column A change the 3 to a 1.

    Once you've put these change into place have a look at my code, as this checks to see if column 14 equals True, so this line would need changing :
    Please Login or Register  to view this content.
    to :
    Please Login or Register  to view this content.
    This is if you're using column A (we like to call it A but remember that Excel likes to refer to it as a number)

    Hopefully with those changes in place it should start to come together.
    As always, shout out if you come unstuck, but try and get the ticks working first, then concentrate on the other bits.

    HTH

    DominicB

  17. #17
    Registered User
    Join Date
    01-09-2008
    Posts
    17
    That all made perfect sense Dominic,

    Thanks again for your help today. Thanks to RoyUk also for a cracking little bit of code.

    I think that just about covers all my questions for the day - I've learned alot!

    Whats standard etiquette if I need further assistance - post on this thread again or open a new one? Sorry, bit of a newbie to all this.

    Tom

  18. #18
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi tommytee
    Quote Originally Posted by tommytee View Post
    Whats standard etiquette if I need further assistance - post on this thread again or open a new one? Sorry, bit of a newbie to all this.
    Your original problem is solved now, so feel free to start another thread.
    If you think that the contents of this thread are relevant in your next posting, then feel free to post a link.

    Glad you're sorted.

    DominicB

  19. #19
    marryuk
    Guest

    Re: Changing VBA code from Outlook to Lotus Notes

    Best Outlook to Notes Migration Application then quickly Convert Outlook Emails database like contacts tasks, journals, notes, calendar, outbox, inbox, draft and deleted items and offer two saving option to save PST file items to single or multiple NSF File formatting supported by MS Outlook 2010(32bit) 2007, 2003 and 2000 and Domino Lotus Notes 8.0, 7.0 and 6.5. You can read this websites: - http://www.outlooktonotesconverter.net/

    Try for the demo version FREE of cost - http://www.systoolsdl.com/systools-outlook-to-notes.exe

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Zip File And Mail With Lotus Notes
    By mridzuan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-30-2007, 02:22 AM
  2. Sending Excel through email using Lotus Notes
    By mridzuan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-25-2007, 10:29 PM
  3. Problems understanding automated emailing code.
    By DDONNI in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-19-2007, 12:26 PM
  4. emailing from excel via lotus notes
    By chris_mayer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-27-2006, 07:56 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1