-
Sep 15th, 2016, 05:53 PM
#1
Thread Starter
New Member
Automation Template Program
Hey,
Basically I tend to use a lot of templates with my work, and would love to make a program that will have numerous buttons I can click, which will either copy a preselected text (from a .txt file possibly?) ready to be pasted in a word document.
Eg: Button A = "Dear Sirs, Thank you for your e-mail"
Button B = "I understand your concerns as being..."
Button C = "Kind regards, Midash"
Etc etc
Would this be possible, and if so... doable for a beginner? I'd ideally like to have the pre-selected text editable within a text file somewhere, and also beable to name button A, B, C etc... for ease of access?
Any help would be greatly appreciated so much!!!
-
Sep 16th, 2016, 04:58 AM
#2
Re: Automation Template Program
Would this be possible, and if so...
i can not see any reason this could not work, possibly use a list box with a list of the templates, just click the one you want
in the click event for the listbox, something like
Code:
myfolder = "c:\temp\" ' change to suit, note trailing \
f = freefile
open myfolder & listbox1.text for input as f
tmp = input(lof(f),#f)
close f
selection.typetext tmp
you then only need 1 block of code for all templates
of course, i am sure you realize, that word has some built in features to do some or all of this
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|