+ Reply to Thread
Results 1 to 7 of 7

Variable Word URL Printout

  1. #1
    Registered User
    Join Date
    11-27-2008
    Location
    ernglnd
    Posts
    13

    Variable Word URL Printout

    Hi;

    I'm in a bit of a predicament;

    I have set up a macro which prints a word document stored on my HD, however, i need to be able to change the file im printing within excel easily; is there a way in which i can use a variable URL in the code, i.e. make the macro print the URL stated in cell A1 for example??

    Im really struggling with this one so any help would be much appreciated!

    Thanks in advance...
    Last edited by VBA Noob; 11-27-2008 at 04:38 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    It would help if we could see the code 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

  3. #3
    Registered User
    Join Date
    11-27-2008
    Location
    ernglnd
    Posts
    13
    Quote Originally Posted by royUK View Post
    It would help if we could see the code that you are using
    Appologies, thanks for pointing that out; heres the code...


    Please Login or Register  to view this content.
    I want to make the "sFile" description variable if possible..

    Thanks
    Last edited by royUK; 11-27-2008 at 04:38 PM. Reason: Added code tags as per forum rules

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

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-27-2008
    Location
    ernglnd
    Posts
    13
    Hey thanks for that Roy!; however; this isnt exactly what i was trying to achieve (but nice coding nonetheless! ill use that)

    The aim of the macro i want to create is to enable me to issue people with standard templates to use, but with an easy way for them to change the "DOCUMENTS" folder (in which all the project specific word docs are saved, T's & C's etc).

    The filenames can stay the same (xxx.doc) but the docs folder needs to be variable as ive about 40 macros printing from the folder.... i want to be able to print the docs using a form button straight from the sheet.... if possible

    The code i submitted works ok until i want to set up another "DOCUMENTS" folder for a different project; at the moment i have to edit the URL's manually which takes ages!!

    Sorry to sound stupid, im quite new to this, this forum scares me, seems to be some seriously knowledgeable people on here after reading some of the threads...!!

    Really interested in learning some tricks though!

    EDIT - my first post was wrong, i actually want to make the path variable! sorry!

  6. #6
    Registered User
    Join Date
    11-27-2008
    Location
    ernglnd
    Posts
    13
    SORTED!
    Please Login or Register  to view this content.
    Last edited by royUK; 11-28-2008 at 03:53 AM.

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Please remember to use Code Tags in future

+ 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