Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7529137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:34:43+00:00 2026-05-30T04:34:43+00:00

just wondering where to put this macro. It’s supposed to cause correctly labelled excel

  • 0

just wondering where to put this macro. It’s supposed to cause correctly labelled excel files ato save as PDF as well whenever the user hits save. I have a similar Macro working without issue for Word, but for the life of me I can’t seem to work out where this macro goes.

I’m running on Xp Sp3 with Excel 2007. I’ve tried saving it in a module within a .xlam to C:\Program Files\Microsoft Office\Office12\XLSTART, C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Office\12.0, C:\Documents and Settings\username\Templates etc. but no joy?

Am I missing something obvious (no surprise)?

Sub FileSave()
'
' FileSave Macro
'
'
  Dim StrFile As String
  Dim StrPath As String
  Dim StrName As String
  Dim StrPDFName As String

  StrPath = ActiveSheet.Path 'Get document path
  StrFile = ActiveSheet.Name 'Get document name

  If StrName <> "" Then

    MsgBox "We have a string name"

    StrName = Left(StrFile, (InStr(StrFile, ".") - 1))

      StrPDFName = StrPath + "\" + StrName + ".pdf"

      If InStr(StrFile, "_fmpro_temp") Then

        ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= StrPDFName, _
            Quality:= xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False

        MsgBox StrName + " has been saved. " & vbNewLine & _
            "If you're finished, please close the file," & vbNewLine & _
            "and return to FileMaker to accept or discard this version.", _
            vbInformation, "FileMaker Pro Versioning"

      End If

  End If


End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:34:45+00:00Added an answer on May 30, 2026 at 4:34 am

    If this is to be an Excel Add-in, then if you call

    Application.UserLibraryPath()
    

    That will give you the directory to save add-ins to which will be something like: C:\Documents and Settings\Username\Application Data\Microsoft\AddIns\

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just wondering should I encode all the data before I put in to the
While this is by no means really important, I was just wondering if the
Ok, just wondering on the versions of PHP that this class is built into.
Just wondering if anyone has encountered this and has a good fix. Here is
Just wondering if I am doing something wrong or if this is a perl
I was just wondering if it's a good idea to do this. For example
I have never seen this issue before, its very strange. Just wondering if anyone
Just wandering if its a good idea to put username and password in the
Just wondering how I can make my app open automatically at login, but make
Just wondering if the following is considered to be good programming practice or not?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.