+ Reply to Thread
Results 1 to 2 of 2

Use userform to populate and save outlook item

  1. #1
    Registered User
    Join Date
    02-04-2015
    Location
    london
    MS-Off Ver
    2013
    Posts
    1

    Use userform to populate and save outlook item

    Hello All!

    I have started creating and coding a userform in outlook that will populate a email template using the data from the text fields in the userform.

    I'm having a few difficulties though sadly, i have managed to get the data to transfer to the email template. however i can not get the template to then save afterwards using the .SaveAs function.

    Im currently getting the a "object variable with block variable not set" error and i don't know why .

    My code is below:


    Please Login or Register  to view this content.

    Is the line in bold correct?

    Any help would be appreciated!
    Last edited by sillymansam; 02-05-2015 at 12:36 AM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Use userform to populate and save outlook item

    There's nothing wrong with that line of code as far as I can see, the problem is more likely due to how you've declared MyItemInitial.

    This should outside any subs, eg at the top of the userform module, and shoulnd't be repeated anywhere else.
    Please Login or Register  to view this content.
    [/code]
    If posting code please use code tags, see here.

+ 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. Outlook 2007, Referencing mail Item created from outlook template
    By thusidie in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 07-21-2014, 04:33 PM
  2. Populate row value in userform textboxes, edit and save the changes back in sheet.
    By p_nayak268 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2013, 07:48 PM
  3. [SOLVED] Macro to populate a specific cell with each item on a list and save
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-27-2013, 10:02 PM
  4. [SOLVED] Item in ListBox (search) to populate UserForm with values
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-12-2013, 04:47 AM
  5. lookup row, populate userform textboxes, amend and save changes to original row
    By rich23l in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2012, 07:03 AM

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