+ Reply to Thread
Results 1 to 11 of 11

Attaching PDF to Lotus Notes email. PDF name is variable.

  1. #1
    Registered User
    Join Date
    03-12-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Unhappy Attaching PDF to Lotus Notes email. PDF name is variable.

    Hi , as I have mentioned on previous posts, I am very new to all this and need some help if you can possibly spare 5 or 10 minutes.

    I have written a macro that when I am pricing for a client, I click one button on the page and the following happens.

    1. It saves the internal prices from the sheet called "internal" as a PDF, naming that PDF according to the data in cell "BD2".
    2. It saves a PDF of the client prices from a sheet called "Client Quote" as a PDF, naming that PDF according to the data in cell "AY8"
    3. It opens up a new mail in Notes, inserting TO: email and CC:emails. It then inserts a subject title, also taken from cell "AY8" and body text and signature from various cells within the workbook.

    I have all of this bit working now.

    I now need it to attach the client price PDF to the email also, but for the life of me I cant work out how to do that. I have tried recording macros and copying that code into this macro but I am completely lost.

    Any help you can give me would be very much appreciated.

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    03-12-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Attaching PDF to Lotus Notes email. PDF name is variable.

    Anyone have any ideas on this?

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Attaching PDF to Lotus Notes email. PDF name is variable.

    Maybe?

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-12-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Attaching PDF to Lotus Notes email. PDF name is variable.

    Hi John

    thanks for this, I have run this macro and its getting hung up on the create PDF element I had place in for creating the client price PDF.

    The following error message is being displayed.

    Run-Time error '1004:

    Document not saved, the document may be open, or error may have been encountered when saving.

    Its creating the email but still not attaching the PDF.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Attaching PDF to Lotus Notes email. PDF name is variable.

    Maybe:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-12-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Attaching PDF to Lotus Notes email. PDF name is variable.

    Hi John, still getting it hanging up as previously, with same error

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Attaching PDF to Lotus Notes email. PDF name is variable.

    Can you send me a sample workbook with the sheetnames as mentioned above?

  8. #8
    Registered User
    Join Date
    03-12-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Attaching PDF to Lotus Notes email. PDF name is variable.

    Hi John

    I have found the issue, its to do with the naming of the file. although the file is being named as I require as a variable name. excel is not picking up the variable part of the name when searching for the file to attach, its only seeing the fixed field " Quotation No."

    I have changed this code to run a test with a fixed file name being created and looked for and it works fine and does everything I want it to.

    However I do need the filename to be a variable, so Im a little lost as to what to do here now.

    Code I have working is as follows:
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-12-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Attaching PDF to Lotus Notes email. PDF name is variable.

    I should have that the cell the data is being picked up from has the following formula to create that name:

    ="Quotation No."&H8&" - "&F4&" - "&H7&" - "&G16

    Although in windows explorer the full file name is showing as I want it to, when I drop the file into our MIS system in work, its only picking up the "Quotation No." aspect of the name.

    I hope I am making sense to you here. as I said, when running it as a fixed name, it works, but I need the naming of the file to be variable.

  10. #10
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Attaching PDF to Lotus Notes email. PDF name is variable.

    Maybe:

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    03-12-2013
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Attaching PDF to Lotus Notes email. PDF name is variable.

    John My friend, you are a genius. all working now. I just did an Irish jig in the office.

    thanks for your patience.

  12. #12
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Attaching PDF to Lotus Notes email. PDF name is variable.

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.


    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ 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. Attaching ZIpFiles with Lotus Notes
    By TonyforVBA in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2010, 08:15 AM
  2. Email Workbook through Lotus Notes
    By nih in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-31-2009, 10:09 AM
  3. Email Information in Lotus Notes
    By tobeinvented in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-29-2009, 02:23 AM
  4. [SOLVED] Why won't AOL email communicate with lotus notes email?
    By ManInaMaze in forum Excel General
    Replies: 0
    Last Post: 08-02-2005, 10:05 PM
  5. [SOLVED] Email using Lotus Notes & FollowHyperlink
    By Glenn Ray in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2005, 04:06 PM

Tags for this Thread

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