4
Answers

C# - insert macro into word document using C#

Michael Griffith

Michael Griffith

13y
4.5k
1
I am trying to insert a macro into eight Word documents using a C# program.  I can open a word document and insert various things  (particularly mailmerge, as that seem to be pretty prevalent on the net), but I cannot find any clues, that I understand, to point me in the right direction. I have the required macro in a .bas file and it just need slotting into my eight documents so that if I need to modify it I only have to do it once.  Can anyone help please.

Answers (4)
0
Sam

Sam

NA 157 0 15y

Sam,
Thanks for your good help intentions.
I somehow (not sure) managed to restore the files, but I'm not sure what I did.
I simply collected the files I believed should be in the project and made sure they all are in the right folder with the correct namespace, and the most important (i believe) was getting rid of repetitions.

I find the VS (I use Express) to be extremely (dangerously) sensitive to file handling and lacking good automatic file backup (I used to work with Borland Builder where each build saved full backup of previous builds).
I would nevertheless appreciate any good guidelines that will help me prevent such issues in the future.
Sam
0
Sam Hobbs

Sam Hobbs

NA 28.7k 1.3m 15y
Do you still need help?