Word Interop Application casting error in Vista
Mon, 3 Dec 2007 07:25:01 -0800
I have a Windows app that uses the Primary Interop Assemblies for Word. It
runs just fine on XP machines. It does not on Vista. The Vista machine is
running Word 2003, so I installed the O2003PIA assemblies. However, I get
the following error when trying to access Word:
Unable to cast COM object of type ...
|
BuilInDocumentProperties not working in Word 2007 with C# / VS2008
Fri, 30 Nov 2007 10:00:01 -0800
Hello,
I'm automating Word 2007 from an Outlook 2007 Addin done with VAS2008.
But I can't write any document property:
((Microsoft.Office.Core.DocumentProperties)(oWord.ActiveDocument.BuiltInDocumentProperties))[Word.WdBuiltInProperty.wdPropertyCategory].Value =categories;
I get a very strange error:
Una ...
|
Word 2007: SavaAs a all-inclusive HTML
Thu, 29 Nov 2007 21:06:00 -0800
Hello,
I want to save a document as a all-inclusive HTML which is consisted of a
HTML file and many images. It doesn't mean the all-in-one file which is
usually known as MHT file.
I developed a sample program. The program has the source like following.
// Source Code
//
object obFileFormat = WdSaveF ...
|
System.Security.SecurityException: That assembly does not allow
partially trusted callers.
Tue, 27 Nov 2007 14:18:06 -0800 (PST)
I have created an ActiveX control that does word automation. Once I
creat an instance of work I get the following message
System.Security.SecurityException: That assembly does not allow
partially trusted callers.
I am using .net 2. I have a key and use the regasm tool after it the
dll is compiled
I am re ...
|
C# Taking control over your application when user shuts it down
Mon, 26 Nov 2007 11:56:02 -0800
Hi,
I'm using automation for MS Word through the PIA's.
Consider this basic class:
using System;
using System.Collections.Generic;
using System.Text;
using Word = Microsoft.Office.Interop.Word;
namespace WordTest
{
class WordApp
{
private Word.ApplicationClass _Word = null;
...
|
Per page text extraction issue using office XP PIAS VS2005
Wed, 21 Nov 2007 14:54:01 -0800
I need to extract the text on a per page basis. I found the reference to the
Pages/Page and Rectangles/Rectangle that would have worked but I can't seem
to find the Objects but can't seem to find it in the PIAS that I have.
http://msdn2.microsoft.com/en-us/library/microsoft.office.interop.word.rectangle_members( ...
|
document.Merge() gives inconsistent results
Tue, 20 Nov 2007 17:05:12 -0000
hello,
in office 2003, if you did
document1.Merge(document2)
it would report a line that is in document1 but not in document2 as
inserted, and a line that is in document2 but not in document1 as deleted.
i.e. it would assume that document1 is the "new" document and document2 is
the "old" document.
...
|
|
|
Word - best model for inserting multiple docs into templates
Thu, 15 Nov 2007 16:30:00 -0800
I wonder what is the best model for automating the process (using C# and Word
automation) of taking many client Word docs (text, bold, bullets, images,
borders, tables, shapes, etc) and adding these to a new doc that enforces
overall layout and font/paragraph settings?
Our current process does not work very ...
|
WinWord.exe can not quit after automation it in VB.
Tue, 13 Nov 2007 16:20:44 +0800
Here is the step:
1. Execute the following code in VB:
Private Sub Command1_Click()
Dim wrdapp As Word.Application
Set wrdapp = CreateObject("Word.Application")
wrdapp.Visible = True
Set wrdapp = Nothing
End Sub
2. Open a IE, Drag and drop a wor doc file into ...
|
Word Late Binding with C#
Wed, 7 Nov 2007 14:30:01 -0800
I haven't been able to find much help on this topic anywhere. I am hoping I
can find it here.
I have developed an application, amongst other things, that opens a word
doc, grabs the collection of bookmarks found, returns them to the user and
allows the user to modify their values and save the new document ...
|