Hi..
I'm after how to set up a macro file such as docm for each app for each office version.
Any help appreciated.
TIA
Lisa
Macro folders
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Macro folders
Your subject mentions folders, but the post itself mentions files. What exactly do you want?
Best wishes,
Hans
Hans
-
- PlutoniumLounger
- Posts: 15647
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Macro folders
Hi Lisa.
What do you mean by (or why do you want) "each Office Version"?
I ask because, to the best of my knowledge, the VBA applications I have written in Office 2003, some of them migrated from Office 97, all still work in the the modern versions of Office.
Cheers, Chris
He who plants a seed, plants life.
-
- 5StarLounger
- Posts: 964
- Joined: 08 Nov 2012, 17:54
Re: Macro folders
Hi Chris,
I'm in the middle of migrating from office 16 32 bit to 64, purely becauase it was free with a new laptop.. And my ""macros" don't work. there is apparently a different method being used that I have yet to get to grips with. After some googling and finding nothing solid about the way the different files should be "installed" it struck me that there doesn't appear to be a lot.. read almost nothing.. for office 2003 2007 2013 either. Soooo... I'd like to create a list of install ttechniques for docm type of files for those versions. I'm concentrating on macros essentially and not templates, which is a whole different story. This for excel word powerpoint outlook and access. I'm hoping that it comes down to a list of folders.. well.. one can always hope!!
Are you using templates rather than "macro enabled" files?
Great to see you are still up and running.. Hope all is good!!
Lisa
I'm in the middle of migrating from office 16 32 bit to 64, purely becauase it was free with a new laptop.. And my ""macros" don't work. there is apparently a different method being used that I have yet to get to grips with. After some googling and finding nothing solid about the way the different files should be "installed" it struck me that there doesn't appear to be a lot.. read almost nothing.. for office 2003 2007 2013 either. Soooo... I'd like to create a list of install ttechniques for docm type of files for those versions. I'm concentrating on macros essentially and not templates, which is a whole different story. This for excel word powerpoint outlook and access. I'm hoping that it comes down to a list of folders.. well.. one can always hope!!
Are you using templates rather than "macro enabled" files?
Great to see you are still up and running.. Hope all is good!!
Lisa
-
- PlutoniumLounger
- Posts: 15647
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Macro folders
Hi Lisa.
I went through the migration to 64 bit about ten or more years ago and have forgotten what was involved.
I've just had a quick look through my utility library, and the term "Longptr" jumped out at me.
Reading through these search reults might pass on several clues.
https://eileenslounge.com/search.php?ke ... mit=Search
I have attached a module of declaratives which I imagine I had to make.
On top of that, here is the start of a procedure that uses ... something.
Code: Select all
Public Function strGetUNC(ByVal DriveLetter As String) As String
' Ron Mittelman Rmittelman@ Visto.com
'Here 's a function that can convert a drive letter to a UNC path name.
' Public Declare Function WNetGetConnection Lib "mpr.dll" Alias "WNetGetConnectionA" (ByVal lpszLocationName As String, ByVal lpszRemoteName As String, cbRemoteName As Long) As Long
On Error Resume Next
Dim sReturnVal As String
' 9073: "strGetUNC : generates "ByRef argument mis-matchafter PtrSafe additions"
#If VBA7 Then
Dim lSize As Longptr
#Else
Dim lSize As Long
#End If
Dim lResult As Long
strGetUNC = ""
sReturnVal = Space$(255)
lSize = Len(sReturnVal)
Not exactly running, but waiting for the electrician to arrive and break me of my habit of hard-wiring my baseboard heaters every time Muskrat Falls sends a surge down the power lines.Great to see you are still up and running.. Hope all is good!!
I am done shoveling drifting snow for the day, so I can get back to worrying about my workload ...
(later) this topic is where I started complaining
Cheers, Chris
You do not have the required permissions to view the files attached to this post.
He who plants a seed, plants life.
-
- 5StarLounger
- Posts: 964
- Joined: 08 Nov 2012, 17:54
Re: Macro folders
Thank you both Chria and Hans..
And I will continue looking as well!! LOL!!
Regards
Lisa
And I will continue looking as well!! LOL!!
Regards
Lisa
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Macro folders
Changes to the declaration of Windows API functions is one aspect of the change from 32-bit to 64-bit Office.
Another is that most or all ActiveX controls don't work in 64-bit Office.
Another is that most or all ActiveX controls don't work in 64-bit Office.
Best wishes,
Hans
Hans
-
- PlutoniumLounger
- Posts: 15647
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Macro folders
Hi Lisa; this sounds as if you have managed to identify a specific template with its collection of procedures, that "used to work" but "doesn't work anymore". And that suggests that you have a template that works on one machine that happens to be 32-bit, but not on second machine that happens to be 64-bit.
I am correct so far? Is there indeed one template that satisfies these conditions?
(If there are several such templates, then I'd suggest that you pick the one that is the simplest example).
You will probably be best served by working out exactly what needs to be done for that one template, get it working, then transport it to other machines/versions of Office before tackling the remainder of the set.
Cheers, Chris
He who plants a seed, plants life.
-
- Microsoft MVP
- Posts: 1320
- Joined: 24 May 2013, 15:33
- Location: Warminster, PA
Re: Macro folders
Hi Lisa,
Chris's examples show some of the things you need to set up so that a macro can run on either 32-bit or 64-bit Office, depending on which bitness it finds installed at runtime. It has nothing to do with which folders the macros are in. There are two factors that have to be programmed for:
The VBA7 compiler variable is automatically set by Office 64-bit programs; you don't define it yourself.
Chris's examples show some of the things you need to set up so that a macro can run on either 32-bit or 64-bit Office, depending on which bitness it finds installed at runtime. It has nothing to do with which folders the macros are in. There are two factors that have to be programmed for:
- Which version gets called for any Windows API functions the macros call.
- Whether the macros will use 32-bit pointers (declared as Long variables) or 64-bit pointers (declared as LongPtr). Also, VBA functions must be declared as PtrSafe.
The VBA7 compiler variable is automatically set by Office 64-bit programs; you don't define it yourself.
-
- 5StarLounger
- Posts: 964
- Joined: 08 Nov 2012, 17:54
Re: Macro folders
Thank you everyone.. all good information but I'm still looking!
Regards
Lisa
Regards
Lisa