Dear sir,with my regards,i have in my worksheet an invoice in range(c2:j42) ,i need to save this range only as a picture or other format except excel at f:\ invoices file.
Is there a way or code to do that,please.
Dear sir,with my regards,i have in my worksheet an invoice in range(c2:j42) ,i need to save this range only as a picture or other format except excel at f:\ invoices file.
Is there a way or code to do that,please.
Last edited by tofimoon4; 10-19-2010 at 05:47 AM.
Dear sir,with my respect,i feel so sad to see (only) my post in the page without any reply.
I hope i have one.
Many thanks.
tofimoon, don't bump your thread unless it has not received a reply in 24 hours.
All helpers here are volunteers, who put in their own free time to provide answers. The site does not come with a warranty for either speed nor accuracy of solutions provided.
Select your cells, use "Copy as picture", open an imaging software like Windows Paint, paste and save.
Dear sir,with my apology,i know this way to save,i need a macro to do this request .
I shall wait if there is no time for me now.
My appreciation.
Try this
Change the path (strFolder) to suit your needs.Please Login or Register to view this content.
Hope this helps
If you need any more information, please feel free to ask.
However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....
Also
اس کی مدد کرتا ہے اگر
شکریہ کہنے کے لئے سٹار کلک کریں
If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.
Dear sir,many thanks for your reply,as i have a little experience in VBA ,i ask you kindly for help by complete your code with the data i have below :
- worksheet name ( invoice no. like 111 )
- range of data ( which i want to save ) ( b2:j46)
- the folder i want to save in ( F:\invoices)
I hope you shall give me your hand, with my appreciation.
Try this
Please Login or Register to view this content.
The first Sub will save the active worksheet to your location and name it like so
"Book1_Sheet1.pdf"
The second will allow you to select your range to publish and name it like so
"Sheet1.pdf"
Hope this helps
Dear sir,i feel i have a frustration and failure in using the code with my modifications,the name of my worksheet is ( invoice ) ,its lacation at ( F:\ ) path,the range which i want to save is ( b2:j42) in (invoice) worksheet.
How can i change and modify in your code? i dont know .
Please, if you have a time and patience ,help me ,or consider all the problem as solved.
many thanks my dear.
The Sub SaveRangeAsPDF does as you asked without any modification.
If it doesn't then there should be enough information in the two subs provided, for you to work a routine to suit your needs.
Dear sir,what i have done is:
- copying a codes to module workbook.
- creating buttons for these two codes.
- instead of (Select Range to Publish) i print the range ( b2:j42)
- i didnt change anything with (ActiveSheet.Name) in the code.
- i didnt add anything except the range.
When i press the button of (saving range) , a window appeared with ( the range i have printed ) and an empty bar ( i didnt know what i can put in ) to reach the goal.
i asked your goodself about the mistakes i have made in above steps,with my thanks.
Try this
Please Login or Register to view this content.
That should do as you ask.
Dear sir,good morning,many thanks for reply, this comment has appeared : (compile error: variable not defined) and this phrase (xltypePDF) on ( range ) row in module was coloured by blue, after pressing the macro button.
I asked your goodself about the solution of this problem.
My regards.
Have you got Excel 2007 or later? I don't think the code will work on earlier versions
It would help if you updated your user profile with the version of Excel that you are using.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
Ok my sir, iam using excel 2003 .
Please amend your User profile. To save as a pdf in Excel 2003 you will need pdf writing software.
Dear sir,i have ( foxit & acrobat readers ) on my system.
Thanks Roy.
I've been using 2007 of late and increasingly have not needed to fire up a 2003 m/c, should have checked that.
My 2003 has PDF software, but now I think of it, it is not standard, therefore the code will not work pre 2007.
tofimoon4 how about, as Roy says, update your profile, Where are you? What Version do you use? It's not difficult.
Last edited by Marcol; 10-18-2010 at 04:24 AM.
You can't use pdf readers, it needs to be a writer
Dear Mr.Marcol: with my regards,i am using microsoft office 2003 .
Dear Mr.royUK : with my apology , i have downloaded (Cute PDF writer ) as you have adviced, and no changes in the result.
Is it possible to send a file with all details to see what can we do on?
My thanks .
You need different code that's why & you still haven't changed your user profile.
I'll ry to look at this tonight
Ok sir,with my thanks.
Something like this
Please Login or Register to view this content.
Dear sir,with my thanks for your patient,i have downloaded (Cute PDF writer ) and followed the program instructions which have guided me to save the range i need in (PDF) format ( by hand not macro).
I have tested the macro ( without any changes in ) which didnot work with this comment (Run-time error 1004) and this line coloured with yellow .
(Application.ActivePrinter = "CutePDF Writer on CPW2:")
What can i change now ,please.
As I said ealier, you need to check the name of the CutePDF printer in your list of available printers
Dear sir,i have checked the name which was similar,is it possible to change the format from (pdf ) to ( gif )?
my regards.
The code should work if you change the printer name. Saving as an image would require a whole different set of code
Dear sir,which name i need to select for the printer to let the code works?
your help is much appreciation.
You need the CutePDF printer name
Many thanks sir for help and consider the problem as solved.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks