C# Tutorial - Open Word File in RichTexBox in C# | FoxLearn

Sdílet
Vložit
  • čas přidán 6. 09. 2024
  • How to Open Word File in RichTexBox using Microsoft Word Automation in C# .NET Windows Forms Application.
    Website: foxlearn.com
    how to open word file in c# windows application
    open word file in richtextbox c#
    open word document in richtextbox c#
    open a word file in richtextbox c#
    load word document in richtextbox c#
    microsoft.office.interop.word open document c# example

Komentáře • 33

  • @mohamedsaleh-eq7zd
    @mohamedsaleh-eq7zd Před 8 dny

    Awesome is it possible to create a table and merge cells and split the cells and columns ? Could you please guide me ? Thanks in advance for your anticipation cooperation

  • @duyphan2919
    @duyphan2919 Před 2 lety

    thank you so much

  • @_Liam__
    @_Liam__ Před 2 lety

    thank you very much!

  • @nitnelavspetorials
    @nitnelavspetorials Před 2 lety

    Line 37 and 38 have a problem at ActivateWindow:
    CS1061 C# does not contain a definition for and no accessible extension method accepting a first argument of type could be found (are you missing a using directive or an assembly reference?)

  • @hasanmohiuddinahmed6614

    Awesome stuff. Keep it up!
    Thank you so much.
    Can you make a tutorial on how to set continuous Line Numbers in an existing word document using Microsoft.Office.Interop.Word ?
    I am in search of this kindly help me in this regard I'll be very thankful to you.

  • @logiclaunchpvt.ltd.officia7207

    if listbox is populated with all word files then by selecting that file from listbox can it open in richtextbox? if yes then please tell me exact code for it?

  • @logiclaunchpvt.ltd.officia7207

    Thanks

  • @logiclaunchpvt.ltd.officia7207

    Can you help me with below logic with code:
    If suppose a text or word file is browsed in richtextbox and each line of file is splitted in another textbox and same line is splitted in 3 textbox as current word, previous word and next word text/richtextbox and when done some modifications in splitted line and splitted words from current word, previous word and next word text/richtextbox then the updated all lines and all words as a whole should get saved in original text or word file ?

    • @logiclaunchpvt.ltd.officia7207
      @logiclaunchpvt.ltd.officia7207 Před 4 lety

      I have a code done for splitted line and splitted words . Can I send you the code ?
      Please tell me your mail id to send code ?

    • @foxlearn
      @foxlearn  Před 4 lety

      You can post your problem at c-sharpcode.com. Not clear your idea

    • @logiclaunchpvt.ltd.officia7207
      @logiclaunchpvt.ltd.officia7207 Před 4 lety

      @@foxlearn ok I will post over there with my sample code

    • @LogicLaunchPvtLtd
      @LogicLaunchPvtLtd Před 4 lety

      @@foxlearn i have posted my problem. Below is the link.
      c-sharpcode.com/thread/save-the-splitted-word-into-original-place-of-file-when-edited/?postbadges=true

  • @lerocher2182
    @lerocher2182 Před 4 lety

    Hi Sir,
    Can I host office in wpf without using Webbrowser Gui element?

  • @carlvillejaeedano7230
    @carlvillejaeedano7230 Před 3 lety

    C# Design
    Can you make a tutorial by clicking the Button directly in Document Text

    • @foxlearn
      @foxlearn  Před 3 lety

      OK. Thank you for your suggestion

  • @logiclaunchpvt.ltd.officia7207

    can you help with save .docx file and below queries?

  • @brunochavarria
    @brunochavarria Před 4 lety

    The BtnOpenClick throws the error CS1674, any ideas how to fixi t? The code is the same as in the video. I´m using WPF forms btw

  • @alirezaabedi1885
    @alirezaabedi1885 Před 4 lety

    wp

    • @logiclaunchpvt.ltd.officia7207
      @logiclaunchpvt.ltd.officia7207 Před 4 lety

      If suppose a text or word file is browsed in richtextbox and each line of file is splitted in another textbox and same line is splitted in 3 textbox as current word, previous word and next word text/richtextbox and when done some modifications in splitted line and splitted words from current word, previous word and next word text/richtextbox then the updated all lines and all words as a whole should get saved in original text or word file ?

    • @foxlearn
      @foxlearn  Před 4 lety

      Thank you !

    • @foxlearn
      @foxlearn  Před 4 lety

      Not clear your idea

    • @logiclaunchpvt.ltd.officia7207
      @logiclaunchpvt.ltd.officia7207 Před 4 lety

      @@foxlearn 1) multiple lines are there in any text file.
      I have managed to split each lines .
      And when we edit some content in any line and when we want to save the content then the modified line and other lines of earlier text file should get overwrite to the textfile

  • @shubhamsahuSD
    @shubhamsahuSD Před 4 lety

    😉

  • @dimashine88
    @dimashine88 Před 2 lety

    Здравствуйте! Помогите, пожалуйста при попытке поиска текста через:
    private void SearchReplace()
    {
    Word.Find findObject = Application.Selection.Find;
    findObject.ClearFormatting();
    findObject.Text = "find me";
    findObject.Replacement.ClearFormatting();
    findObject.Replacement.Text = "Found";
    object replaceAll = Word.WdReplace.wdReplaceAll;
    findObject.Execute(ref missing, ref missing, ref missing, ref missing, ref missing,
    ref missing, ref missing, ref missing, ref missing, ref missing,
    ref replaceAll, ref missing, ref missing, ref missing, ref missing);
    }
    Выскакивает ошибка:
    System.AccessViolationException: "Попытка чтения или записи в защищенную память. Это часто свидетельствует о том, что другая память повреждена."

  • @carlvillejaeedano7230
    @carlvillejaeedano7230 Před 3 lety

    Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. The system cannot find the file specified.'

    • @foxlearn
      @foxlearn  Před 3 lety

      Try to add a reference to office com

    • @carlvillejaeedano7230
      @carlvillejaeedano7230 Před 3 lety

      @@foxlearnStill Could not load file or assembly 'office, Version=15.0.0.0,

    • @carlvillejaeedano7230
      @carlvillejaeedano7230 Před 3 lety

      @@foxlearn
      what will i add?.
      I tried to add microsoft office 16.0 but still Could not load file or assembly 'office, Version=15.0.0.0