• Formatting Code for Path (2002)

    Author
    Topic
    #407733

    I can

    Viewing 3 reply threads
    Author
    Replies
    • #855277

      Hi Omega

      Starting with Excel 2002 you can insert the path in a header or footer by using &[Path]. For details see MSKB 287482.
      This can also be achieved by using VBA, which was the only way to achieve this prior to Excel 2002, for details see MSKB 213615.

    • #855278

      Hi Omega

      Starting with Excel 2002 you can insert the path in a header or footer by using &[Path]. For details see MSKB 287482.
      This can also be achieved by using VBA, which was the only way to achieve this prior to Excel 2002, for details see MSKB 213615.

      • #855336

        I knew about the &[path] when you do it manually but I wanted to do it using VBA. Unfortunately you don’t use the same thing when you set the Pagesetup.LeftFooter property in VBA. I already had code to setup my footer for other things except the pathname.

        I will drop the &F and simply use the Activeworkbook.fullname and that will give me both path and filename. Maybe the next release will include the formatting code for the path. But this solution does the job. Thanks!

        • #855771

          Hi,
          The formatting code for the path is &Z – if you want path and filename you just use &Z&F.
          Hope that helps.

          • #855911

            Thank you Rory.

            I looked up the Formatting codes in MSDN under Excel 2002 and &Z was not listed as one of them. Glad to know what the proper code is so I can include it in my footer page. Thanks again.

          • #855912

            Thank you Rory.

            I looked up the Formatting codes in MSDN under Excel 2002 and &Z was not listed as one of them. Glad to know what the proper code is so I can include it in my footer page. Thanks again.

        • #855772

          Hi,
          The formatting code for the path is &Z – if you want path and filename you just use &Z&F.
          Hope that helps.

      • #855337

        I knew about the &[path] when you do it manually but I wanted to do it using VBA. Unfortunately you don’t use the same thing when you set the Pagesetup.LeftFooter property in VBA. I already had code to setup my footer for other things except the pathname.

        I will drop the &F and simply use the Activeworkbook.fullname and that will give me both path and filename. Maybe the next release will include the formatting code for the path. But this solution does the job. Thanks!

    • #855279

      You can use VBA. See post 44551. Or see Tony’s reply.

    • #855280

      You can use VBA. See post 44551. Or see Tony’s reply.

    Viewing 3 reply threads
    Reply To: Formatting Code for Path (2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: