[Dba-office] Outlook template and macro

Gustav Brock gustav at cactus.dk
Thu Jan 21 09:33:55 CST 2016


Hi Susan

Job done, happy client, and the links were a good help. Thank you.

The task was from a special received mail to create a respond mail with some extra info (phone number for an SMS gateway). I used an InputBox to get the number, then send the mail silently without displaying it. Thus, I could use the existing template and modify it via code only so, luckily, I didn't have to redesign the template. I haven't found out how to save a modified template, and it is hard to search for solutions because the keywords lead to a bunch of irrelevant results.

I partly had to modify some existing code (not by me) and, once again, it struck me how much sloppy code "programmers" get away with ...

/gustav

-----Oprindelig meddelelse-----
Fra: Dba-office [mailto:dba-office-bounces at databaseadvisors.com] På vegne af Susan Harkins
Sendt: 11. januar 2016 18:41
Til: dba-office at databaseadvisors.com
Emne: Re: [Dba-office] Outlook template and macro

If you figure out the modify/save route, let us all know! Thanks!

Here are some of my favorite sites for Outlook development -- but I do so little that I don't make much use of them: 

https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=outlookdev
http://www.outlookcode.com/article.aspx?id=37
http://www.howto-outlook.com/tag/development
http://www.slipstick.com/outlook-developers/
http://www.helenfeddema.com/

Helen has a lot of great code samples but not much in the way of how-to help. Slipstick and Helen are both available for hire, so if you can't do it, you might recommend either or both to your client. 

Susan H. 

-----Original Message-----
From: Dba-office [mailto:dba-office-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Monday, January 11, 2016 12:26 PM
To: dba-office at databaseadvisors.com
Subject: Re: [Dba-office] Outlook template and macro

Hi Susan

Oh, I feel like an idiot but a have the small hope to not end up like that - at least to the client - seems I can use all the luck I can get.

Yes, I can see and edit the code - it seems to live completely separated from the template - it actually opens this and manipulates the content.

I'll try the copy and rename trick for the template.

/gustav

-----Oprindelig meddelelse-----
Fra: Dba-office [mailto:dba-office-bounces at databaseadvisors.com] På vegne af Susan Harkins
Sendt: 11. januar 2016 18:10
Til: dba-office at databaseadvisors.com
Emne: Re: [Dba-office] Outlook template and macro

Gustav, I've never figured out how to modify and save a template. I just copy the original into a new one, change it and then save it using the original name -- or not... 

The otm file is code. Can you see it and open it in the VBE? 

Good luck -- I hate Outlook development. It's the least documented and the easiest to make you look and feel like an idiot. 

Susan H. 

    %appdata%\Microsoft\Outlook

Now, when opening Outlook, I have a Forms, UserForm1 form (seems empty) and a Modules, Module1 module with some functions that seems relevant to the task.

/gustav 



More information about the Dba-office mailing list