Current file path is not exits

Technical support for Spire.Doc

Moderator: iceblue support

Current file path is not exits

Postby kotechkh » Mon Jun 05, 2017 2:45 pm

Hello, i'm trying to replace a text in word document with another text using replace method but it gives {"Current file path is not exits."} error.
Code: Select all
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Spire.Doc;

   
namespace WindowsFormsApplication6
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
       
       
        private void button1_Click(object sender, EventArgs e)
        {

            //load
            Document doc = new Document();
            doc.LoadFromFile(@"‪‪‪E:\asdaa.docx");

            //save
       
            doc.Replace("Text1", textBox1.Text, false, true);
            doc.Replace("Book", textBox2.Text, false, true);
            doc.SaveToFile(@"C:\Users\kchkholaria\Desktop\asdaa.docx", FileFormat.Docx);

             
           

        }
    }
}

Any advice would be helpful
thank you in advance.
kotechkh
 
Posts: 3
Joined: Thu Jun 01, 2017 1:56 pm

Re: Current file path is not exits

Postby Betsy.jiang » Tue Jun 06, 2017 1:37 am

Dear kotechkh,

Thanks for your inquiry.
If you are using older version of Spire.Doc, we firstly suggest upgrading to the latest Spire.Doc Pack(hot fix) Version:5.9.16. Hope this helps. After trying this version, if the problem persists, please provide us with your input document here, or send it to us(Support@e-iceblue.com) via email.That would be helpful to investigate this issue.

Thanks,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1628
Joined: Tue Sep 06, 2016 8:30 am

Re: Current file path is not exits

Postby Betsy.jiang » Wed Jun 07, 2017 9:28 am

Dear kotechkh,

Has your issue been resolved ?
Could you please give us some feedback at your convenience ?

Thanks,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1628
Joined: Tue Sep 06, 2016 8:30 am

Re: Current file path is not exits

Postby kotechkh » Sun Jul 02, 2017 11:31 am

Thank you very much I fixed the problem somehow but It wasn't a spire.doc version problem.
kotechkh
 
Posts: 3
Joined: Thu Jun 01, 2017 1:56 pm

Re: Current file path is not exits

Postby Betsy.jiang » Mon Jul 03, 2017 1:19 am

Dear kotechkh,

Thanks for your feedback.
Please feel free to contact us if you need any help.

Sincerely,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1628
Joined: Tue Sep 06, 2016 8:30 am


Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 0 guests

cron