• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Question?? [SOLVED]

hi Sir,


I actually have some new fields in query is it possible to do by vba form I wan to fill up all red entries in word document on click event both samples are attached.


Regards

Nipendra


Attached file here=== http://www.fileconvoy.com/dfl.php?id=g34ddc23fe708c503999344781a20461ee7c211bdc
 
Nipendra


Have you had a look at: http://chandoo.org/wp/2011/02/17/printing-excel-reports-via-a-word-document/
 
Hi Nipendra,

The link Hui posted includes step-by-step instructions, as well as a downloadable example. Is there a particular part of the tutorial that you got stuck on? Working with VB is a little tricker than just regular formulas because it has to be setup for your exact setup (sheet names, locations, etc). You should be able to either use the example workbook directly, or modify your current workbook using the instructions included. However, as I said alluded to before, if there is a particular section that you got stuck on, we would be happy to help.
 
Good day Nipendra Dhiman


Have you read the link Hui gave or just skimmed over it and then come back to ask for help without giving any details of the help needed.


Members do all they can for posters, in some case doing all the work required, but you will get a better response if you can show you have tried and then give some idea of where/how/what help you need.


"Dear Hui i am not expert like you please help me out if you can" says I cannot be bothered to help myself will you do all.


Many on this forum are not experts (that's why they are here, to tap into the experts)......but they try to work problems out and then ask for and get the help they need.
 
Thanks for your valuable replies actually I have tried it many times and I had a look then downloaded both files but wasn't able to get proper output and that line "Dear Hui i am not expert like you please help me out if you can" I didn't mean anything wrong, Respected Hui I apologies feeling shameful


now I will take it again and then let you folks know if further help required


Regards

Nipendra
 
Nipendra


I will get to this in the next day or so, but am rather busy on other jobs at present
 
Nipendra

Have a look at the two files here

https://www.dropbox.com/s/h4s0u9v4ykgjupw/Sample_DataTransfer.zip

They must be located in the same directory


Open the Excel file

Fill in the fields

Apply


The word Doc becomes a template and a new file is made called E-Details1.docx which has the field values in it


If you change the File or Worksheet Names you will need to re-link the mail merge fields from the Word Doc to the Excel file
 
Hi Hui,


I was thinking that's not possible to do but after seeing your solution (code) provided by you it is awesome really,

I'll implement it with my requirement and get back to you if anything not doable from my end.


Thank u So much

Warm Regards

Nipendra
 
Hi Hui,


hope you doing well,

and i am so glad to get awesome reply from you just want to ask one thing more can i create a pfd file also on the same click after word file which have been created.


or do i need to activate another vba project reference also for creating a pdf .


Thanks and Regards

Nipendra
 
If you set an Adobe Printer as the default printer you can do what you want

Or change the code to select a PDF printer before it runs the main code
 
no i don't need to print it just to view the document only


and i have written -:

"WordDoc.ExportAsFixedFormat OutputFileName:="C:UsersNippyDesktopmypdf.pdf", ExportFormat:=wdExportFormatPDF"


before Quit the word document.
 
Back
Top