Group:  Microsoft Word » microsoft.public.word.oleinterop

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Threads Replies Last Post
5 Pages: 1  2  3  4  5  
Word Replacing text maintaining formatting
Hi, I have a C# Word add-in where I want to replace the text of each paragraph with alternate text. I achieve this as follows: foreach paragraph in the document r = p.Range; text = r.Text; alternateText = getAltText(text) r.Text = alternateText This works fine for replacing the text. However I do lose formatting information (e.g. where one word in the paragraph is italisised...
8 13.07.2006 16:12:20
Linking and embedding question.
Hello, Here is a scenario. I have a folder which I am going to use various forms from we will call this the template folder. I have an excel file called information.xls I have a word file called work.doc I will use the two files over and over again and create new new directories in which to put them. I will change information in the spread sheet r1:c1 What I want to do is create a l...
7 04.07.2006 17:05:33
Word Add-in deployment problem (machine where it was not developed
Hi, I have a Word add-in that works fine on the machine where is was developed, but if i try to deploy on another machine, the OnConnection method gets called but the OnStartupComplete method does not. To debug this i tried starting with a very simple add-in, that just adds a button to the command bar and pops up a message when the button is clicked. This add-in worked fine on both mac...
2 29.06.2006 18:21:01
BigChurch
BigChurch http://bigchurch.com/go/g671669 ...
1 24.06.2006 19:07:27
Cams.com
Cams.com http://cams.com/go/g671669 ...
1 24.06.2006 19:05:57
How to obtain DWG file from OLE object?
Hello All, I am writing a console based application using C# in which I want to implement a feature which could extract OLE objects from Word documents and then save it in DWG file format. The OLE objects exist in Word documents are in the form of AutoCAD Drawing i.e. once I double clicked the Object; the system opens it in AutoCAD 2000. Currently I have accessed the OLE object through "...
2 17.06.2006 14:43:02
Word dialog box problem
Hi When I try to open documents by word.application.documents.open(...) I some times get error dialogs for different reasons. It could be margins or table errors for example. The problem is that my code is running on the server and not displayed to the user. I would like to open the documents and not display any dialogboxes even if there are any document errors. Someone know how to a...
2 17.06.2006 14:39:02
Cannot launch Word 2003 from IE
I am using an ActiveX DLL to launch MS Word from IE browser. It works well for most of the computers running Word 2003 SP2. However, two computers gets “Class does not support automation or does not support expected interface” error. Somehow the statement Set oWord = new Word.Application fails on the two machines. What happened to Word installed on these 2 computers? ...
1 15.06.2006 17:41:01
Bitmaps and variable data
Hi there. My apologies if I've posted in the wrong forum, and without the relevant information (sorry!), but I have no idea where this query should be posted. I'm doing a mail merge where a bitmap needs to be changed depending on a country column in a database. Can anyone shed any light on this? ...
2 14.06.2006 14:09:02
Copy WebBrowser HTML Content to Word ActiveDocument
I am currently writing an add-in for Word in C#. In it I have a form that allows a user to communicate with a server and retrieve documents in either HTML form or in XML with XSLT. After the user has viewed the realized document in the WebBrowser I want to allow them to copy it seamlessly into the ActiveDocument. I have a partial solution (kludge) that works but it involves saving the...
1 12.06.2006 20:05:03
Auto Spellcheck Off using mailmerge
I am having a problem with some docs. The users have created file templates which use word's mail merge. When merged, most docs do not have the auto spell check functionality due to this: http://support.microsoft.com/?scid=kb;en-us;242339&spid=2530&sid=328 If I select all and set what the above link says spellcheck is resotred, even after the merge it still work. What I would like to d...
2 08.06.2006 16:41:02
Word 2007 - Docs to Go will not sync
Documents to Go (DTG) synchs Office documents with the Palm; I have a Tungsten T3 and Documents to Go 8.003. I've gone back & forth woth DataViz about this, but they have no suggestions. I did a concurrent install of Office 2007 with Office 2003 (working fine) because I thought this might be a problem; however, even setting Office 2003 as the default application doesn't help - DTG will...
4 28.05.2006 16:04:59
Sharepoint List as a Merge Database source in Word 2003
Is there a way to use a Sharepoint List as a Merge Database source in Word 2003(without having to use Excel or Access as a "middle step"?) ...
2 26.05.2006 16:54:30
Word 2003 Dlls (English Version) and Word 2003 Dlls (German Versio
Hi, I have created a Word Style Extractor to extract formatting styles from Word document. This application is created using VS 2002 (English version) with C# and used the Microsoft Office 11.0 Object Library (office.dll English version) through interop. If the application compiled with the Microsoft Office 11.0 Object Library (office.dll English version) reference, w...
3 23.05.2006 08:28:01
DDE 'appname' for Word?
In a program I'm writing, I establish MS Word as the DDE Server. In the command that opens a DDE channel, I use 'WINWORD' as the appname. It works fine on all of our servers but one, where the program hangs on that command. I wonder if someone can tell me what exactly Windows does with this string in order to find the app? I assume it looks in the Windows registry, but where? Thanks...
1 14.05.2006 09:53:56
Centering text in table cell
I'm trying to center some text in the first cell of a table. The table originally had 5 columns but I merged the first row into 1 column and put 3 lines of text in it that I want to be centered. I tried: tabl.Cell(1, 1).Select Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter but it didn't work. Any ideas? Thanks, Drew ...
2 05.05.2006 12:37:03
Changing paragraph formatting
I would like to set the spacing before and after to 0 pt. I tried: Selection.WholeStory With Selection.ParagraphFormat .SpaceBefore = 0 .SpaceAfter = 0 .LineUnitAfter = 0 End With but it didn't work. What's the right way? Thanks, Drew ...
2 05.05.2006 12:37:03
Getting out of a table
Got this from some example code but it doesn't seem to work: Function CreateSpaceAfterTable(ByRef tbl As Word.Table) As Word.Range Dim rng As Word.Range ' Move the range outside the table. Set rng = tbl.Range rng.Collapse Direction:=wdCollapseEnd rng.InsertParagraph rng.Collapse Direction:=wdCollapseEnd Set CreateSpaceAfterTable = rng End Function After ca...
4 05.05.2006 12:37:02
Problems with table
I've created a table and would like to merge all the cells in the first row. Code: tabl.Range.Cells(1).Select tabl.Range.rows(1).Select Selection.Cells.Merge ' Fails on this line The error I get is: "The requested member of the collection does not exist" What is this referring to? Thanks, Drew...
4 04.05.2006 16:15:08
Detect paragraph contains picture
In my Word add-in, I'm using the following code to replace all the paragraphs of a Word document with replacement text (a "translated" version of the text"). The code is as follows. // Translate individual document paragraphs private void PreProcessContent() { string text = ""; int i = 1; foreach (Word.Paragraph p in doc.Paragraphs ) { Word.Range r = p.Range...
3 03.05.2006 12:34:02
Problems automating opening of a word 2003 document
Hi all, Firstly I would like to apologise if this post is in the wrong group. There is no "word.ole" group on its own so I figured here would be the best place. I've been having problems with my word automation. Here is a sample of my code : WordApp := CreateOLEObject('Word.Application'); WordApp.Visible := False; WordApp.Documents.Open(OleDocumentName, EmptyParam,EmptyParam,...
3 02.05.2006 08:12:59
Word C# Watermark
Hi, I'm trying to insert a watermark with a Word Add-in. I'm using a variant of Paul Stubbs code that i found from a Google. The method I'm using is as follows: private void addWatermark(Word.Document doc, string WatermarkText) { doc.Application.ActiveWindow.View.Type = Word.WdViewType.wdPrintView; ...
4 27.04.2006 13:32:34
Supressing\altering E-mailing of document from Word add-in
Hi, I have a C# Word add-in (currently Word 2003 but needs to work for leagcy aswell) and when certain documents are active i want to somehow supress the facility to e-mail the content of the document (eg. using the E-mail button on the tool bar or the "File->Send To" options. Is ther some way that i can do this? When other documents are open, i want to programmatically alter the docu...
3 25.04.2006 13:54:02
Edit merged documents, then print
Hello, I have written an Access 2000 module to automate a mail merge. I pop up a form to allow the user to enter the criteria to select the data for the merge fields. When user clicks the Merge button a function in the module is called. The function creates a query string, then creates a CSV file with the data selected by the query. Then it uses a MailMerge object to set the CSV file as...
3 25.04.2006 13:21:47
Invalid MS Word Characters in XML
Hey Folks, I'm not sure if it is best to post that here or on a .Net forum. I've written a program that extracts the content of word documents and writes it to a XML document. For example the content is extracted as so: string FragmentBody = TempDocument.Content.Text; I write the string to the XML document via: XMLFile.WriteElementString ("fragment_body", FragmentBody); In my XML d...
2 25.04.2006 13:21:46
5 Pages: 1  2  3  4  5  

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net