Note that there are some explanatory texts on larger screens.

plurals
  1. POVisual Studio Tools for Office breaks VB6
    text
    copied!<blockquote> <p><strong>UPDATE 3:</strong></p> <p>This happens when I have saved the vb6 script, close word, start word, then run the template as you would normally run a template, i.e. strTemplate becomes Normal.doc. Then as soon as I go back to the original template which has not been saved through vsto, that goes back to having Letter.doc in the variable strTemplate...</p> </blockquote> <p><strong>UPDATE 2:</strong></p> <p>In my startup script, I have a line as follows:</p> <pre><code>strTemplate = ActiveDocument.AttachedTemplate </code></pre> <p>In the original template which is named Letter.dot, strTemplate = Letter.dot.</p> <p>But for some reason, in the new vsto template which was based on the original Letter.dot template, the same line above becomes Normal.dot, which is causing problems, even thought the new template is still named Letter.dot.</p> <p>I tried to manually code in </p> <pre><code>strAttTemplate = "Letter.dot" </code></pre> <p>and the script gets to the next stage, but then it starts complaining about something else.</p> <p>So my question is, the original template has strTemplate = Letter.dot, but why does this change to strTemplate = Normal.dot after running the template through vsto?</p> <p><strong>UPDATE 1:</strong></p> <p>After running through a debug for both versions of the template, i.e. the original non vsto template, and the new vsto template, I have found out that the original does not have any document properties, but the vsto template has 2 document properties. But that does not seem to be a problem.</p> <p>It seems that the problem has something to do with the vsto template has normal.dot attached to it, whereas the original non vsto template does not have normal.dot attached to it.</p> <p>Is it possible to remove attached normal.dot from the new template?</p> <p><strong>ORIGINAL QUESTION:</strong></p> <p>I am using Visual Studio 2008 to create a Word 2003 Template project. I select the "use existing template" option which already has some vb6 macro scripting in the background. For some reason, when I save the Visual Studio project, the vb6 scripting stops working.</p> <p>the old vb6 script runs straight away when the template opens in word, but when i simply use the template in vs2008 without adding extra functionality and save the project and build the project, when i try to open the template in word, the old startup script does not work.</p> <p>Why is this happening?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload