Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Application.Find.Execute() method is giving problem in Windows Server 2003

Application.Find.Execute() method is giving problem in Windows Server 2003

Scheduled Pinned Locked Moved ASP.NET
helpsysadminwindows-admin
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    raghvendrapanda
    wrote on last edited by
    #1

    Following is my code:- Word.Range SearchArea = _aDoc.Application.ActiveDocument.Range(ref _missing, ref _missing); // _aDoc.Content.Find.Replacement.ClearFormatting(); _aDoc.Application.Selection.Find.Execute(ref findText, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing); SearchArea = _aDoc.Application.Selection.Find.Replacement.Application.Selection.Range; Object oMissed = SearchArea; Object oLinkToFile = false; //default Object oSaveWithDocument = true;//default _aDoc.InlineShapes.AddPicture(fileName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed); File.Delete(fileName); this.FindAndReplace1("Sign1", ""); Running successfully in Windows Xp but not working in Windows Server 2003 Here i am getting exception _aDoc.Application.Selection.Find.Execute(ref findText, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing); Please any help is appreciated.reuired urgently Thanks

    P 2 Replies Last reply
    0
    • R raghvendrapanda

      Following is my code:- Word.Range SearchArea = _aDoc.Application.ActiveDocument.Range(ref _missing, ref _missing); // _aDoc.Content.Find.Replacement.ClearFormatting(); _aDoc.Application.Selection.Find.Execute(ref findText, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing); SearchArea = _aDoc.Application.Selection.Find.Replacement.Application.Selection.Range; Object oMissed = SearchArea; Object oLinkToFile = false; //default Object oSaveWithDocument = true;//default _aDoc.InlineShapes.AddPicture(fileName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed); File.Delete(fileName); this.FindAndReplace1("Sign1", ""); Running successfully in Windows Xp but not working in Windows Server 2003 Here i am getting exception _aDoc.Application.Selection.Find.Execute(ref findText, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing); Please any help is appreciated.reuired urgently Thanks

      P Offline
      P Offline
      Prosanta Kundu online
      wrote on last edited by
      #2

      What exception r u getting? Also format the code using <pre></pre> tag.

      R 1 Reply Last reply
      0
      • P Prosanta Kundu online

        What exception r u getting? Also format the code using <pre></pre> tag.

        R Offline
        R Offline
        raghvendrapanda
        wrote on last edited by
        #3

        I am stuck at this place . Its working fine in Window XP but giving above mentioned ComException error here The stub received bad data Exception from HRESULT: 0x800706F7 _aDoc.Application.Selection.Find.Execute(ref findText, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing); Its urgent.Any help is highly appreciated Thanks

        1 Reply Last reply
        0
        • R raghvendrapanda

          Following is my code:- Word.Range SearchArea = _aDoc.Application.ActiveDocument.Range(ref _missing, ref _missing); // _aDoc.Content.Find.Replacement.ClearFormatting(); _aDoc.Application.Selection.Find.Execute(ref findText, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing); SearchArea = _aDoc.Application.Selection.Find.Replacement.Application.Selection.Range; Object oMissed = SearchArea; Object oLinkToFile = false; //default Object oSaveWithDocument = true;//default _aDoc.InlineShapes.AddPicture(fileName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed); File.Delete(fileName); this.FindAndReplace1("Sign1", ""); Running successfully in Windows Xp but not working in Windows Server 2003 Here i am getting exception _aDoc.Application.Selection.Find.Execute(ref findText, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing); Please any help is appreciated.reuired urgently Thanks

          P Offline
          P Offline
          Prosanta Kundu online
          wrote on last edited by
          #4

          Try this

          Word.Find oFind = _aDoc.Application.Selection.Find;
          oFind.Execute(ref findText, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing);

          R 1 Reply Last reply
          0
          • P Prosanta Kundu online

            Try this

            Word.Find oFind = _aDoc.Application.Selection.Find;
            oFind.Execute(ref findText, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing);

            R Offline
            R Offline
            raghvendrapanda
            wrote on last edited by
            #5

            Still it is giving me the same exception The stub received bad data

            P 1 Reply Last reply
            0
            • R raghvendrapanda

              Still it is giving me the same exception The stub received bad data

              P Offline
              P Offline
              Prosanta Kundu online
              wrote on last edited by
              #6

              Use late binding for the Find object. See this [http://support.microsoft.com/default.aspx?scid=kb;en-us;313104]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups