SimplyACoder

Hello,

I have a VSTO Word document with a simple messagebox that appears on startup. I copied and removed the assembly information from these documents manually (File->Properties->Custom). I closed and saved the document, then reopened it and it opened as a normal document.

I then paste the information back into the Custom Properties, save and restart and its VSTO enabled again, no problems.

However, I would like to paste this assembly information into the word document and kick-start VSTO without having to save and reopen the document. Is there any way inside word, or within VBA that would allow me to do this in any fashion.

Thank you for the assistance.



Re: Visual Studio Tools for Office Kick Starting VSTO after document opens

Geoff Darst - MSFT

Hi,

Yes, ServerDocument.AddCustomization will do that for you. See http://msdn2.microsoft.com/en-us/library/ms185673(VS.80).aspx.

Sincerely,

Geoff Darst

Microsoft VSTO Team





Re: Visual Studio Tools for Office Kick Starting VSTO after document opens

SimplyACoder

Hi there,

I have a VSTO Word document and I remove its manifest information manually. What I am looking is to open that exact same word document after I've removed the manifest information, paste the manifest information back in and have the document VSTO enabled without a restart.

Currently this works fine if, after I paste the manifest information back in, I save and reopen it. I am wondering if I can kick start VSTO without closing and reopening the document.

This manifest cutting and pasting is happening in VBA. So the document opens, VBA open sub fires, pastes the manifest information in for me. I want it to be VSTO enabled from this point, rather than after a document 'restart'.

Any information would be great.