Hi,
I want to print the selected worksheets in pdf at D:\Output automatically instead of one by one manually.I have already have a PDF printer installed.The filename of each PDF should be as that of worksheet name.
Any help will be appreciated.
Hi,
I want to print the selected worksheets in pdf at D:\Output automatically instead of one by one manually.I have already have a PDF printer installed.The filename of each PDF should be as that of worksheet name.
Any help will be appreciated.
Hi,
I have found the codebut here I want the filename to be extracted from the current sheet as : MID(A7,16, till last character)&","MID(A8,11,till last character)![]()
Please Login or Register to view this content.
i.e in Nutshell,it should extract the filename from A7 after ":" &","& A8 after ":"
How this can be incorporated in the above code.
I will be eagerly waiting for kind reponse.
You will get a better and faster response if you upload a sample workbook.
Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.
Remember to desensitize the data.
Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
Lewis
Thankx for the reponse.Ultimately after googling I found the code which is as follows
And it worked.![]()
Please Login or Register to view this content.
Thanx for the kind concern to this query.
Last edited by paradise2sr; 12-25-2017 at 08:29 AM.
Hi,
Try the attached file which I hope meets all your requirements to process several items at a time. I implemented the following.
a. Replaced 'Active X' CommandButtons with Forms CommandButtons.
b. When Creating CheckBoxes added 'LinkedCell underneath the CheckBox.
Linked Cell' formatted tohide contents with 3 semi-colons ';;;'
When processing checkboxes now look for 'TRUE' or 'FALSE' in the Underlying Cell.
c. Updated the code per User request and removed all proprietary information.
d. I sanitized the file, so there should not be an sensitive information.
I formatted the 'PrintArea' for 1 Page Tall by 1 Page wide so the output would always be ONE PAGE:
![]()
Please Login or Register to view this content.
Appropriate code excerpts follow:
Lewis![]()
Please Login or Register to view this content.
Thanx a lot for your kind response.This seems to be more benefited.
One more things if possible.Can you add a separate option that the data be exported into word in a single file,similar like mail marge by a macro whereas other code remain intact.
Hoping a positive response in this regard.
Last edited by paradise2sr; 12-28-2017 at 10:49 AM.
Also,the module : Mod2_UDF_spell_..... has been modified,hence the output value is not interpreted in words which was earlier done.I want this to be left intact.Currently it is in big bracket giving result as [****** Simulation 1900800******] which is absurd.
In addition to above,if possible,I would prefer few things-
1.Create pdf file : Yes ...........(this is very nice which you have already done)
here in this I want further an option to be added whether individual or in a single pdf file.
I mean to say,when I click on 5 selected it is creating 5 pdf file which is fine.I want further an option to merge all this 5 pdf file into a single pdf file.
OR, say you can add an option whether pdf file is required separate pdf or a single pdf file based on this choice it can be opted anyone.
2.I want same result in word
I will work on your requests. It may take several days, since Microsoft Word VBA is difficult for me to work with.
You sent me a PM with a link to your file, which you said had sensitive information in it. I removed anything that I thought might be sensitive. I removed your code module Mod2_UDF_spell_nepalese and replaced it with a new 'simulated module', in case the other module had sensitive information.Also,the module : Mod2_UDF_spell_..... has been modified,hence the output value is not interpreted in words which was earlier done.I want this to be left intact.Currently it is in big bracket giving result as [****** Simulation 1900800******] which is absurd.
You can currently fix it yourself by deleting my module, and replacing it with a module from your original file.
Lewis
I am not in hurry.Pls take your time as long as you require.And thanx for your kind interest.I will surely wait.
Hi,
Try the attached file.
Microsoft Word DOES NOT play nicely with other applications. I was able to user the 'format' sheet to create files in Word, but the results were extremely ugly. I took a second approach, which uses a 'Master Word file' that looks like Sheet 'format'. To allow you to make changes without need for VBA code, the 'Word' sheet uses a 'Pseudo Mail Merge' technique. There are sentinels in the Word file like <G5> which means use the contents of Cell 'G5' from the Excel Sheet being processed.
The following instructions/information are in the file:
Setup Instructions:
a. Modify the constants at the top of code module ModMain if the position of any of the green cells in Column 'L' changes.
b. Modify the constant at the top of code module ModMain if the name of the 'Master Source Word File' changes.
c. The 'Master Source Word File' MUST be in the same folder as this file.
d. Checkboxes on Sheet 'data' DO NOT have to be manually deleted. Delete the data, the select the 'Add CheckBoxes' CommandButton' on sheet 'Master'.
Sheet 'data' DOES NOT have to have data on every line.
Master Source Word File:
a. The 'Master Source Word File' looks similar to the contents of Sheet 'format'.
Sheet 'format' can not be used to create 'Word Files', because a perfectly good letter format
in Excel looks terrible when copied to 'Word' (unless an image of the Excel sheet is desired).
b. File 'ExcelForumCreatePdfStatements2WordMaster.docx' contains the 'Master Source Word File' which is equivalent to Sheet 'format' when creating pdf files.
The file should be 'Read Only' to prevent the file from being modified by accident.
c. The file contains 'Pseudo Mail Merge' sentinels (e.g. '<G5>'), where 'G5' indicates an Excel Cell Address.
Enjoy.
Lewis
Last edited by LJMetzger; 01-01-2018 at 05:39 PM.
Its an awesome work.Thanx a lot.You indeed gave a flexible choice to use.
Lastly, in data could you use Ref.No. in which there are checkbox assigned.And just to pull the data in output/result part just left hand side of date or opposite to date
The thread is marked as solved - are you still hoping for more help?
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
Yeah it is already.I know.If possible,plz see 2nd statement request.
I've removed the solved tag to draw attention to it again.
I'm glad you liked what I did. It was a challenge but fun to work on.
See the attached Excel file and new 'Word Master File'. I put the 'Ref No' in Cell 'A6' on the 'Destination Sheet'.Lastly, in data could you use Ref.No. in which there are checkbox assigned.And just to pull the data in output/result part just left hand side of date or opposite to date
I don't know where the reference number comes from so I used the 'Row Number'. We can't currently use Column 'A' on Sheet 'format', because there is a 'TRUE' or 'FALSE' value currently in those cells (underneath each CheckBox) to indicate whether the CheckBox for that row is checked.
You should be able to change the Ref. No. to anything you want, by modifiying the line in red below on line 529 of code module ModMain:
![]()
Please Login or Register to view this content.
No,It is already solved.Hence,initial forum contributor will just reply and it is not compulsory for last queries raised to be solved.Hence,I a have marked it solved again which you have done unsolved.
Thankx for your kind concern too.
My point is that the initial forum contributor will not necessarily review the thread once it is marked as solved, so if you are asking further questions, it's best to leave it until those issues are addressed. Anyway, you now have your answer.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks