In the Word Options dialog box, (1) click Customize Ribbon in left bar, (2) check the Developer option in the right box, and (3) click the OK button. See screenshot: Now the Developer tab is added in the Word Ribbon. Go ahead to click Developer > Legacy Tools > Option Button. See screenshot: 4. Now a radio button is inserted in the document where your cursor places on.
Hi All, I am in a bit of a pickle. I have setup a command button in a word document that users can click and it sends the document to a specified email address and closes down word automatically.
After several days of google site hopping, and failed attempts to get this thing going, I am at the point where I think I am going to go either bald or grey and I am only 24. I have the code sorted however when I check the email attachement, the document appears blank without the user's changes. The file is subject to fields and the users are unable to edit the document apart from those fields I have created. I do not require them to save the file as I am the only one who needs the finalised version. 'In a summary here is what I would like it to do. User hits submit (control toolbox command button) which then sends the completed document automatically to my mailbox and closes word without any save But you have an explicit save instruction.
If Len(ActiveDocument.Path) = 0 Then 'Document has not been saved ActiveDocument.Save 'so save it End IfIn any case you MUST save it in order to send it as a file (attachment). I can not duplicate your problem. I created a template (TestFileAndSend.dot). It has three formfields and a ActiveX commandbutton. It is protected for forms so the formfields will work.
I clone a new document and I fill in the formfields and click the Send button. I get the SaveAs dialog. Now.this MUST happen because of the: If Len(ActiveDocument.Path) = 0 Then 'Document has not been saved ActiveDocument.Save 'so save it End If It does not have to happen if you (the programmer) do an explicit SaveAs instruction within your code. In other words, it is possible to do a programmatic SaveAs to some location with no user interaction. Then you could delete it after, or not. When I either accept the default name (the text of the first formfield), or type in a new one - and again this can be bypassed if you programmatically do a SaveAs - it performs exactly as you seem to want it to.
It sends an email to the given address, and the attached file DOES have the entries I typed into the cloned-from-template document. I am not really bothered if it saves or not As your Outlook code dictates (and as Gerry has pointed out.), if you're going to attach it, then the file has to be saved. But could you just add the info to the Message body?.Body = activedocument.Formfields('Name').Result & ' has requested ' & Activedocument.Formfields('NumTickets').Result & ' for ' & Activedocument.Formfields('EventDate').Result. But I really need it to be dummy proof for the users. Nothing is foolproof because fools are so ingenious Also if possible to set it so that it sends an automatic email back to the user confirm receipt of the attachment and inform them their tickets will be ready within 5 working days.
Of course, you can setup a delivery request, but I'm not sure if you can send an automated response, say, based on a Subject line. I had a sample doc setup, but forgot to comment out theActiveDocument.Close wdDoNotSaveChanges on the LAST test run!:banghead: Maybe later. Hi Tinbendr I need to have the actual document as an attachment for audit purposes. I did ask if having the document as the email body would be okay, but it is not allowed. I am a real beginner to this programming stuff, so most of the coding goes straight over my head. If I have to save the document first, would it be possible to specify a set filename and path that can also pull the users name and place it in the document title.
I work for a local government org, so we all use outlook and all have our info set in our systems. I use field codes to add our individual names to the signature of generic letters we have to send out, so I am presuming that I can get this info into the title.
I would however, like this to be hidden from the user, so once they click the submit button, everything disappears without any dialog boxes to save or close. The only way they should be able to find out what has happened is if they look in their sent items and see the email has been sent to myself. As for the return message, I can setup a rule in outlook to pick up any emails with the document title in it that is set by the coding and have an auto-reply sent back to it that way. Everything else is fine, apart from the save as part, so if you could send me the code that would be much appreciated.
Once I have it sorted I will put up the code for others to use/follow. Best regards. I need to have the actual document as an attachment for audit purposes.
You just need a hard copy on your end? Does the hard copy HAVE to come from the users computer? Could you run a macro, say from Word, that would iterate through your mailbox, picking out the Reserve seat e-mails and printing them out? (I'm not try to circumvent any requiremnt, just looking for less user intervention/resources.) If that will meet the requirements, then I would suggest a userform that would show upon the opening of the template. Collect the information from user, then stuff that in an email to you. You would run the another maco on your machine (maybe once a day) to printout the orders.
As for the return message, I can setup a rule in outlook to pick up any emails with the document title in it that is set by the coding and have an auto-reply sent back to it that way. I was thinking code wise.
(just overthinking it.). 'I need to have the actual document as an attachment for audit purposes. ' How on earth does that fit with your statement: 'I am not really bothered if it saves or not' This is a contradiction. But in any case, you MUST save it in order to send a file as an attachment.
Attachments are files, therefore you must have a file. A Word document on screen is NOT a file until you save it. I did not change your code at all, except of course to use my email address. 'would it be possible to specify a set filename and path that can also pull the users name and place it in the document title' Yes, absolutely. Username can be returned programmatically by: Environ('UserName') So, for me, this returns: gerry.knight It is the system (Windows) logon name.
Now this is simply a string. You may (and I would recommend you do so) want to replace any '.' You may have in your logon names, if you are going to use it in a filename. Replace(Environ('username'), '.'
, ') So.add this to your code to 'set filename and path that can also pull the users name and place it in the document title' ActiveDocument.SaveAs Filename:='THEPATH ' & Replace(Environ('username'), '.' , ') & '.doc' YOU must supply THEPATH. Make sure you put the ' ' at the end.
ActiveDocument.SaveAs Filename:='U: Whatever SentDocs ' & Replace(Environ('username'), '.' , ') & '.doc' will save the document as: U: Whatever SentDocs gerryknight.doc Then, in your Outlook part of your code:.Attachments.Add Source:=ActiveDocument.FullName, Type:=olByValue will send the document.
Adding a click-to-call button on your WordPress website is a great way of enabling the leads to contact you easily. When the potential customers tap on the button while browsing your site on mobile devices, they will be able to make calls to you instantly.
In this way, you can make the contact process much easier. But more importantly, it helps you to create a very strong first impression for your brand, which is vital for sales generation. In this article, you will find various ways of adding the click-to-call, including the manual method and the plugin method. Now, let’s dive in.
Adding a Click-to-Call Button Using “Call Now Button” Plugin Call Now Button is an amazing plugin. It enables you to add the call button without writing any code. It can be very useful for those people who doesn’t have any programming experience. Follow these steps:.
Install and activate Call Now Button plugin. Head to Settings Call Now tab. In Button status option, click on the blank checkbox in front of Enabled. Add your phone number. Finally, click on Save Changes button.
Now, visit your WordPress website from your smartphone. You will see that the click-to-call button has been added. Right now, it is in the default form.
However, you can customize it pretty easily. Customizing Click-to-Call Button. Head to Settings Call Now tab. Click on Advance Settings next beside Save Changes button. You will see various options.
You can change the button color, style and position. You can also specify the pages where you don’t want the button to appear. There is also a Click tracking option. You can use it to analyze the users’ interaction with the call-to-action button. Save the changes.
Manually Adding the Click-to-Call Button to Your WordPress Website Here, you will find the way of manually adding the button anywhere on your website with codes. Follow these steps:. Add the codes in the following way:
Head to Media Add New. Upload your desired icon. Then click on Edit. Copy the file URL, which you will need in the later steps. Now, you can add the icon anywhere on your website, including post, page and custom HTML widget. In the edit area, add the following lines:.
Now, visit your website from your PC or mobile device. You will find that the click-to-call button has been successfully added. Conclusion In this article, you have learned to add the click-to-call button to your WordPress website manually and by using “Call Now Button” plugin. Now, your potential customers can call you very conveniently. Check out these top 3 WordPress hosting services.