|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
still problems reading word documents...I tried a new code to read the first page of a word document and save the content to a richttextbox. The code I created just reads the first character of the first page instead of the first page: Function ReadWordDocument(ByVal sPathName As String) As String Dim wdToepassing As New Word.Application() Dim wdDoc As Word.Document Dim oBuiltInProps As Object Dim strValue As String Dim oRange As Word.Range Dim PgDepart As Long Try wdDoc = wdToepassing.Documents.Open(sPathName) 'Get the Built-in Document Properties collection. oBuiltInProps = wdDoc.BuiltInDocumentProperties 'Get the value of the Author property strValue = oBuiltInProps.Item("Author").Value PgDepart = wdToepassing.Selection.Range.Start 'Move the insertion pointer to the bottom of the first page oRange = wdDoc.Range(Start:=PgDepart, End:=PgDepart + 1) oRange.Copy() ReadWordDocument = _ CStr(System.Windows.Forms.Clipboard.GetDataObject.GetData (DataFormats.Text)) Catch oException As Exception MessageBox.Show(oException.Message) ReadWordDocument = "" Finally oRange = Nothing wdDoc = Nothing wdToepassing.ActiveWindow.Close() wdToepassing = Nothing End Try End Function regards Marco The Netherlands Co wrote:
> Hi All, I hope it is not considered inpolite again if I ask you to turn to the Word > > I tried a new code to read the first page of a word document and save > the content to a richttextbox. > The code I created just reads the first character of the first page > instead of the first page: VBA group. ("turn to" = "sich wenden an", isn't it?) Because I think you don't have VB.Net language related problem. Armin
Show quote
Hide quote
On 22 mei, 12:29, "Armin Zingler" <az.nos***@freenet.de> wrote: Armin,> Co wrote: > > Hi All, > > > I tried a new code to read the first page of a word document and save > > the content to a richttextbox. > > The code I created just reads the first character of the first page > > instead of the first page: > > I hope it is not considered inpolite again if I ask you to turn to the Word > VBA group. ("turn to" = "sich wenden an", isn't it?) Because I think you > don't have VB.Net language related problem. > > Armin you are right. I will do that. But for your information I'm not German, I'm Dutch. (-: Marco ROFL
you are right. I will do that. But for your information I'm not German, I'm Dutch. Marco, Where do you think Armin is from? He probably expects that a little bit Dutch person at least could understand a little bit the German Language He asks you if you did understand "Turn To" in formal not much anymore used Dutch "Zich te wenden tot" in German "sich wenden an" In past Armin wrote often "Please go....." translated in German it is polite, for Dutch and people from England, it can be understand in a not meant context . :-) CorCor Ligthert[MVP] wrote:
> ROFL Was not meant to be a question (or expectation) to MarCo himeself. I was> > > you are right. > I will do that. > But for your information I'm not German, I'm Dutch. > > Marco, > > Where do you think Armin is from? > > He probably expects that a little bit Dutch person at least could > understand a little bit the German Language more thinking out loud (or for those that know what I meant). > He asks you if you did understand "Turn To" in formal not much I'm almost sure I never wrote this (though, admittedly I don't remember> anymore used Dutch "Zich te wenden tot" in German "sich wenden an" > > In past Armin wrote often "Please go....." every single of all my posts by heart). But I once wrote "please turn to" which someone considered "instructive" and inpolite - therefore I never dared to write it again. Anyway, I've just learned my first Dutch words. :) ....no, wait, I already know some: Tenminste houdbaar tot ;-) Armin
Show quote
Hide quote
On 22 mei, 17:56, "Armin Zingler" <az.nos***@freenet.de> wrote: Armin is from Germany.> Cor Ligthert[MVP] wrote: > > ROFL > > > you are right. > > I will do that. > > But for your information I'm not German, I'm Dutch. > > > Marco, > > > Where do you think Armin is from? > > > He probably expects that a little bit Dutch person at least could > > understand a little bit the German Language > > Was not meant to be a question (or expectation) to MarCo himeself. I was > more thinking out loud (or for those that know what I meant). > > > He asks you if you did understand "Turn To" in formal not much > > anymore used Dutch "Zich te wenden tot" in German "sich wenden an" > > > In past Armin wrote often "Please go....." > > I'm almost sure I never wrote this (though, admittedly I don't remember > every single of all my posts by heart). But I once wrote "please turn to" > which someone considered "instructive" and inpolite - therefore I never > dared to write it again. > > Anyway, I've just learned my first Dutch words. :) > > ...no, wait, I already know some: Tenminste houdbaar tot > > ;-) > > Armin I can see that. You know there's also a lot of guys with German names living in the States so you never know... Also vielen dank fuer deine hilfe. Auf wieder sehen. Marco
Visual Studio 2008 and Classes Inheriting From System.Web.UI.WebControls.Style
Problem with embedded carriage returns trouble reading word documents Good tutorial for working with XML problem reading array data from structure When double precision isn't very precise how to know if to close sqlreader Multiple File Select Not Working In Published ClickOnce Application Loading an XML Document? drag and drop issue |
|||||||||||||||||||||||