+ Reply to Thread
Results 1 to 29 of 29

save as pic

  1. #1
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    save as pic

    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.

  2. #2
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    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.

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: save as pic

    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.

  4. #4
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    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.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: save as pic

    Try this
    Please Login or Register  to view this content.
    Change the path (strFolder) to suit your needs.

    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.

  6. #6
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    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.

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: save as pic

    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

  8. #8
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    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.

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: save as pic

    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.

  10. #10
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    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.

  11. #11
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: save as pic

    Try this

    Please Login or Register  to view this content.

    That should do as you ask.

  12. #12
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    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.

  13. #13
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: save as pic

    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

  14. #14
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    Ok my sir, iam using excel 2003 .

  15. #15
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: save as pic

    Please amend your User profile. To save as a pdf in Excel 2003 you will need pdf writing software.

  16. #16
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    Dear sir,i have ( foxit & acrobat readers ) on my system.

  17. #17
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: save as pic

    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.

  18. #18
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: save as pic

    You can't use pdf readers, it needs to be a writer

  19. #19
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    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 .

  20. #20
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: save as pic

    You need different code that's why & you still haven't changed your user profile.

    I'll ry to look at this tonight

  21. #21
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    Ok sir,with my thanks.

  22. #22
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: save as pic

    Something like this
    Please Login or Register  to view this content.

  23. #23
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    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.

  24. #24
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: save as pic

    As I said ealier, you need to check the name of the CutePDF printer in your list of available printers

  25. #25
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    Dear sir,i have checked the name which was similar,is it possible to change the format from (pdf ) to ( gif )?
    my regards.

  26. #26
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: save as pic

    The code should work if you change the printer name. Saving as an image would require a whole different set of code

  27. #27
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    Dear sir,which name i need to select for the printer to let the code works?
    your help is much appreciation.

  28. #28
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: save as pic

    You need the CutePDF printer name

  29. #29
    Forum Contributor
    Join Date
    06-06-2007
    Posts
    248

    Re: save as pic

    Many thanks sir for help and consider the problem as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1