Answered by:
System.Runtime.InteropServices.COMException (0x800A1735): El elemento del conjunto solicitado no existe. en Microsoft.Office.Interop.Word.Bookmarks.get_Item(Object& Index)

Question
-
Hola
Estoy desarrollando un programa en C#, utilizo la librería Microsoft.Office.Interop.Word para modificar una plantilla.
El error me aparece al momento de ejecutar el ".exe" que se encuentra en la carpeta "debug", porque si compilo desde Visual Studio funciona a la perfección, adjunto imagen del error.
Y adjunto los ensamblados cargados, cualquier ayuda para embeber las librerías no está demás.
¡Muchas gracias!
************** Ensamblados cargados **************
mscorlib
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.18408 built by: FX451RTMGREL
Código base: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
appGenerarInformeBorrador
Versión del ensamblado: 1.0.0.0
Versión Win32: 1.0.0.0
Código base: file:///X:/AUDITORIAS%20BANCOLOMBIA/2018/ESTRATEGIA/CCHA00701%20-%20PRUEBA%20DE%20JESUS/appGenerarInformeBorrador.exe
----------------------------------------
System.Windows.Forms
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.18408 built by: FX451RTMGREL
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.18408 built by: FX451RTMGREL
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.18408 built by: FX451RTMGREL
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Nini
Versión del ensamblado: 1.1.0.0
Versión Win32: 1.0.0.0
Código base: file:///X:/AUDITORIAS%20BANCOLOMBIA/2018/ESTRATEGIA/CCHA00701%20-%20PRUEBA%20DE%20JESUS/appGenerarInformeBorrador.exe
----------------------------------------
System.Data
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.18408 built by: FX451RTMGREL
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Core
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.18408 built by: FX451RTMGREL
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.18408 built by: FX451RTMGREL
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.18408 built by: FX451RTMGREL
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Transactions
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.18408 built by: FX451RTMGREL
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.18408 built by: FX451RTMGREL
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
Microsoft.Office.Interop.Word
Versión del ensamblado: 15.0.0.0
Versión Win32: 15.0.4569.1506
Código base: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Interop.Word/15.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Word.dll
----------------------------------------
office
Versión del ensamblado: 15.0.0.0
Versión Win32: 15.0.4927.1000
Código base: file:///C:/Windows/assembly/GAC_MSIL/office/15.0.0.0__71e9bce111e9429c/office.dll
----------------------------------------
mscorlib.resources
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.1 (RTMRel.030319-0100)
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_es_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Windows.Forms.resources
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.0.30319.1 built by: RTMRel
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_es_b77a5c561934e089/System.Windows.Forms.resources.dll- Moved by Terry Xu - MSFT Monday, February 19, 2018 12:10 PM
Friday, February 16, 2018 1:11 PM
Answers
-
Translation:
Hello
I'm developing a program in C#, I use the Microsoft. Office. Interop. Word Library to modify a template.
The error appears to me when I run the ". exe " That is in the folder "Debug ", because if compile from Visual Studio works perfectly, attached error image.
and attached assemblies loaded, any help to embed the libraries are not other.
Thanks a lot!I would ask here:
https://social.msdn.microsoft.com/Forums/es-es/home?forum=csharpgeneral
https://social.msdn.microsoft.com/Forums/es-es/home?forum=worddev
Richard Mueller - MVP Enterprise Mobility (Identity and Access)
- Proposed as answer by Dave PatrickMVP Monday, February 19, 2018 1:10 PM
- Marked as answer by Dave PatrickMVP Sunday, February 25, 2018 7:54 PM
Monday, February 19, 2018 1:03 PM
All replies
-
Hello Jevdelae,
This forum is an English forum. I would suggest you post you a thread on a Spanish forum or you could re-post your issue using English so we could understand your issue more exactly. For current thread, we will move the thread to where is the forum for forum.
Thanks for understanding.
Best Regards,
Terry
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Monday, February 19, 2018 12:08 PM -
Translation:
Hello
I'm developing a program in C#, I use the Microsoft. Office. Interop. Word Library to modify a template.
The error appears to me when I run the ". exe " That is in the folder "Debug ", because if compile from Visual Studio works perfectly, attached error image.
and attached assemblies loaded, any help to embed the libraries are not other.
Thanks a lot!I would ask here:
https://social.msdn.microsoft.com/Forums/es-es/home?forum=csharpgeneral
https://social.msdn.microsoft.com/Forums/es-es/home?forum=worddev
Richard Mueller - MVP Enterprise Mobility (Identity and Access)
- Proposed as answer by Dave PatrickMVP Monday, February 19, 2018 1:10 PM
- Marked as answer by Dave PatrickMVP Sunday, February 25, 2018 7:54 PM
Monday, February 19, 2018 1:03 PM