Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2017, 04:40 AM
fatboy1973 fatboy1973 is offline macro command button, save and print and clear Windows 10 macro command button, save and print and clear Office 2013
Novice
macro command button, save and print and clear
 
Join Date: Feb 2017
Posts: 4
fatboy1973 is on a distinguished road
Default macro command button, save and print and clear

Hi all,


I am a total newbie and try to ascertain if it is possible to insert a command button in a word document called "Print and Save" if that is what I need.

I have constructed a word doc for a report that I require different staff to complete at different times, mainly all check boxes to show if something has been done and a couple of text boxes.

The actions upon clicking the command button would be to:


Print the document


Save a version, ideally auto numbering to next in sequence,
save to a designated folder
clearing the fillable form that it is on so a fresh report can be done


Any help in me achieving this would be very highly appreciated.


Thanks in advance
Reply With Quote
  #2  
Old 07-06-2017, 05:48 AM
gmayor's Avatar
gmayor gmayor is offline macro command button, save and print and clear Windows 10 macro command button, save and print and clear Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The attached template will do that. Open it and change the path and the default filename as required currently

Code:
    strPath = Environ("USERPROFILE") & Chr(92) & "Documents\"
    strName = "MyForm_"
and put your form where the fixed text is (leaving the ID field). The ID is incremented each time you create a new document from the template from the number in the ID field.

Create a new document from the template for each new form.

Click the button on the ribbon to save and print the document.

You will need the CustomUI Editor to change the ribbon labels. http://gregmaxey.mvps.org/word_tip_p...bbon_main.html
Attached Files
File Type: dotm MyForm.dotm (38.2 KB, 17 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 07-06-2017, 06:03 AM
fatboy1973 fatboy1973 is offline macro command button, save and print and clear Windows 10 macro command button, save and print and clear Office 2013
Novice
macro command button, save and print and clear
 
Join Date: Feb 2017
Posts: 4
fatboy1973 is on a distinguished road
Default Hello

thanks for this, is it possible for a button command for the print, save and clear element, ideally I would like to use this form on a tablet for the reports to be completed

Thanks again and your time is appreciated
Reply With Quote
  #4  
Old 07-06-2017, 07:07 AM
gmayor's Avatar
gmayor gmayor is offline macro command button, save and print and clear Windows 10 macro command button, save and print and clear Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Not without knowing what the form contains to be cleared. The form will always be cleared when you create a new document from the template which is the correct way to use a template.

As for the use on a tablet ... what sort of tablet? I am not sure how such a template or macros generally work on the non-Windows version of Word.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 07-06-2017, 08:23 AM
Charles Kenyon Charles Kenyon is offline macro command button, save and print and clear Windows 10 macro command button, save and print and clear Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,116
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Tablet version cannot use macros, AFAIK.

Cross-posted at: https://answers.microsoft.com/en-us/...d-697a4df69668
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro command button, save and print and clear Newbie Wants to Add Print Command Button! PapaTom PowerPoint 7 02-25-2013 06:12 PM
macro command button, save and print and clear Command Button to Print Labels Claytocb Excel Programming 1 02-01-2013 12:20 AM
macro command button, save and print and clear Command button - save in temp folder and send email with attachment bigbird69 Word VBA 13 11-18-2012 10:06 PM
Word doc bug when closing from userform command button click macro Joe Patrick Word 1 07-05-2011 08:53 PM
command clear forms dmcohio Word 0 04-08-2010 11:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft