Macro in Word .dotm template not saving

kckay

Board Regular
Joined
Nov 8, 2010
Messages
134
With help from rlv01 (I cannot THANK YOU enough), I was able to get a Word macro to convert plain text links to hyperlinks (Converting All Plain Text Links to Hyperlinks ). I was never able to get that to work in an Excel macro, which would be much better.

I am having issues getting this to operate across the network for other users. I placed the lettertemplate.dotm on a shared network drive. When another user attempts to generate a letter, it gives a "Run-time error -214735253 Can't run the specified macro." I open the Word template and look at macros, it shows, for me, in both the Normal and TemplateProject headings as Module 1. When I have a co-worker look at it, she sees TemplateProject Module1 and the Public Sub Hyperlink() code.

The code used to execute the Word macro from Excel macro: appWD.Application.Run "Module1.Hyperlinker"

What is happening that it is not working for other users from a network drive? How do I fix it?

Could the code that rlv01 wrote be converted to run against the Word document from Excel? This would be the best solution as then no Word templates or calls to external macros in Word would be needed.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
There is no need to use a macro for this; it can all be done by the mailmerge itself. Hence, your template distribution problems can be obviated. See my reply in your other thread.
 
Upvote 0
I am so confused by that write-up. How do I automate it? If it is a manual process to be done AFTER the letter is generated, then just using the normal Hyperlink ribbon button will be easier. If there is a way to automate it and do use mailmerge, how?

Are you saying to convert all of the simple text fields to mergefields within the template, then use mailmerge to bring in the hyperlinks? Won't that be the same issue I have now in that the hyperlinks don't because they are coming from Excel and are just simple plain text links?

The source text is coming from Excel. How do I create a mergefield in Excel text?

I am really sorry, but am confused. I really appreciate the help and want to learn. This look very promising for multiple users across the network.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,021
Latest member
pingpong7117

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top