D
Doug Barnes
I think I have a comparable problem to "Howard Kaikow"
I'm using an "autoexec" macro to check & update a suite of
macros if a later version exists
Most of the code is OK, but I repeatedly find that a
couple of modules won't delete, and if I can't delete
them I can't copy the new version across
Simplified routine is (excuse any layout errors)
For all "macros & forms"
if new version > old version then
call DELMACRO(macroname)
end if
call addnewversion
Next "macro & forms"
Sub DelMacro(ThisMacro)
Application.OrganizerDelete _
Source:=NormalTemplate.fullname _
, Name:=ThisMacro _
, Object:=wdOrganizerObjectProjectItems
End Sub
Most of the time it works, but for two macros called "Get
WorkingDirectoryCode" & "GetPrinterModelCode" it won't
delete them, so they then won't add. I've tried a
different name (GWDC & GPMC) but that doesn't make any
difference
I've even tried capitalising the names just in case there
was a case (capital vv lower) issue involved like in some
library code, but that doesn't make any difference
I can always delete them using the VBA project window,
but can't see how that can be applied in normal VBA code
execution.
Once the program's crashed on the copy (can't copy over
existing file) they've gone from the project list, but
then it's a bit late.
Secondly, I've just moved up to Office 2K3 and find that
changes to the Autoexec macro don't always seen to be
saved when I exit Word.
When I restart work sometimes an earlier version of the
Autoexec macro runs and it's becoming rather frustrating
to troubleshoot the Macrodelete problem when you find the
latest code you're trying has disappeared
Any ideas on either issue??
I'm using an "autoexec" macro to check & update a suite of
macros if a later version exists
Most of the code is OK, but I repeatedly find that a
couple of modules won't delete, and if I can't delete
them I can't copy the new version across
Simplified routine is (excuse any layout errors)
For all "macros & forms"
if new version > old version then
call DELMACRO(macroname)
end if
call addnewversion
Next "macro & forms"
Sub DelMacro(ThisMacro)
Application.OrganizerDelete _
Source:=NormalTemplate.fullname _
, Name:=ThisMacro _
, Object:=wdOrganizerObjectProjectItems
End Sub
Most of the time it works, but for two macros called "Get
WorkingDirectoryCode" & "GetPrinterModelCode" it won't
delete them, so they then won't add. I've tried a
different name (GWDC & GPMC) but that doesn't make any
difference
I've even tried capitalising the names just in case there
was a case (capital vv lower) issue involved like in some
library code, but that doesn't make any difference
I can always delete them using the VBA project window,
but can't see how that can be applied in normal VBA code
execution.
Once the program's crashed on the copy (can't copy over
existing file) they've gone from the project list, but
then it's a bit late.
Secondly, I've just moved up to Office 2K3 and find that
changes to the Autoexec macro don't always seen to be
saved when I exit Word.
When I restart work sometimes an earlier version of the
Autoexec macro runs and it's becoming rather frustrating
to troubleshoot the Macrodelete problem when you find the
latest code you're trying has disappeared
Any ideas on either issue??