Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro for saving Word.docx with text of Header of that document 1

Status
Not open for further replies.

Koen Piller

Programmer
Jun 30, 2005
841
0
0
NL
Hi,
I am new in Macro-country for MSWord.
Would like to create a macro which would save my MSWordfile with a filename which is the same as the Documentheader. If that than works I would like to add a custom icon to my preferable list activating this macro. Is that doable? And if so, someone willing to give me a hand?
Stay Healthy,
Koen
 
Paul,

With your remark # 2 in your last reply you gave a brilliant example of my progressive insight.
I confirm having clicked on the button as shown in one of my previous messages.

Could it be that due to the fact I had a Office365 installed, which subscription is meanwhile, not continued, and a working Office 2010 on my machine Word gets confused about which normal.dot to be used?
(The office 365 is not ness. on this pc anymore and I am fine working with Office 2010.)

Stay healthy,

Koen
 
I would expect there to be only one Normal.dotm. Regardless, if you add the code to whichever Normal.dotm Word uses with Office 2010, the macro will work with Office 2010. Likewise, if you add the code to whichever Normal.dotm Word uses with Office 365, the macro will work with Office 365.

That said, Normal.dotm is the one template I would not be adding the code to.

Cheers
Paul Edstein
[MS MVP - Word]
 
Paul,

Well than that could possibly my problem. I do have 2 normal.dotm files on this pc.
one in ..Microsoft\Sjablonen (Sjablonen is Dutch for Templates) with 26KB dated 29.6.2010 and one in ...Microsoft\Templates with 19KB only from 27.4.2019
Which one do you advise to remove?

Stay healthy,
Koen
 
I suggest you check both Office installation to see which Normal.dotm they're using. See under File|Options|Advanced>General>File Locations. The default location is:
C:\Users\%Username%\AppData\Roaming\Microsoft\TemplatesIf they're each using a different Normal.dotm, change the settings on whichever one you believe is appropriate to point to the Normal.dotm used by the other. Before removing the other one, I suggest you check what customizations it has so you can transfer them to the one you're retaining, if appropriate.

Cheers
Paul Edstein
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top