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

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ม.ค. 2025
  • 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

ความคิดเห็น • 33

  • @nitnelavspetorials
    @nitnelavspetorials 2 ปีที่แล้ว

    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?)

  • @mohamedsaleh-eq7zd
    @mohamedsaleh-eq7zd 4 หลายเดือนก่อน

    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

  • @logiclaunchpvt.ltd.officia7207
    @logiclaunchpvt.ltd.officia7207 5 ปีที่แล้ว

    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 5 ปีที่แล้ว

      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  5 ปีที่แล้ว

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

    • @logiclaunchpvt.ltd.officia7207
      @logiclaunchpvt.ltd.officia7207 5 ปีที่แล้ว

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

    • @LogicLaunchPvtLtd
      @LogicLaunchPvtLtd 5 ปีที่แล้ว

      @@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

  • @_Liam__
    @_Liam__ 2 ปีที่แล้ว

    thank you very much!

  • @logiclaunchpvt.ltd.officia7207
    @logiclaunchpvt.ltd.officia7207 4 ปีที่แล้ว

    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?

  • @duyphan2919
    @duyphan2919 3 ปีที่แล้ว

    thank you so much

  • @hasanmohiuddinahmed6614
    @hasanmohiuddinahmed6614 4 ปีที่แล้ว

    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.

  • @lerocher2182
    @lerocher2182 5 ปีที่แล้ว

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

  • @carlvillejaeedano7230
    @carlvillejaeedano7230 4 ปีที่แล้ว

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

    • @foxlearn
      @foxlearn  4 ปีที่แล้ว

      OK. Thank you for your suggestion

  • @logiclaunchpvt.ltd.officia7207
    @logiclaunchpvt.ltd.officia7207 4 ปีที่แล้ว

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

  • @logiclaunchpvt.ltd.officia7207
    @logiclaunchpvt.ltd.officia7207 5 ปีที่แล้ว

    Thanks

    • @foxlearn
      @foxlearn  5 ปีที่แล้ว

      Thank you !

  • @carlvillejaeedano7230
    @carlvillejaeedano7230 4 ปีที่แล้ว

    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  4 ปีที่แล้ว

      Try to add a reference to office com

    • @carlvillejaeedano7230
      @carlvillejaeedano7230 4 ปีที่แล้ว

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

    • @carlvillejaeedano7230
      @carlvillejaeedano7230 4 ปีที่แล้ว

      @@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

  • @alirezaabedi1885
    @alirezaabedi1885 5 ปีที่แล้ว

    wp

    • @logiclaunchpvt.ltd.officia7207
      @logiclaunchpvt.ltd.officia7207 5 ปีที่แล้ว

      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  5 ปีที่แล้ว

      Thank you !

    • @foxlearn
      @foxlearn  5 ปีที่แล้ว

      Not clear your idea

    • @logiclaunchpvt.ltd.officia7207
      @logiclaunchpvt.ltd.officia7207 5 ปีที่แล้ว

      @@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 5 ปีที่แล้ว

    😉

    • @foxlearn
      @foxlearn  5 ปีที่แล้ว +1

      Thank you !

  • @brunochavarria
    @brunochavarria 5 ปีที่แล้ว

    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

  • @dimashine88
    @dimashine88 2 ปีที่แล้ว

    Здравствуйте! Помогите, пожалуйста при попытке поиска текста через:
    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: "Попытка чтения или записи в защищенную память. Это часто свидетельствует о том, что другая память повреждена."