Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6139459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:59:33+00:00 2026-05-23T17:59:33+00:00

I am trying to using Word Automation to save a document to a network

  • 0

I am trying to using Word Automation to save a document to a network drive. I have full access to it. I can even create directories through code on the drive…..

I created a directory on the drive using Directory.CreateDirectory with no problem….. The issue is trying to use Word Automation to save a word document to that created directory.

the file name and path is in this format: \\gy2k3001\Folder1\Folder2\Test.docx

The code I use is this:

    Object documentPath=filepath;
    wd.ActiveDocument.SaveAs(ref documentPath, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing, ref _oMissing);

where filepath is equal to @"\\gy2k3001\Folder1\Folder2\Test.docx"

The error I get is this: “This is not a valid file name.\n Try one or more of the following:\n* Check the path to make sure it was typed correctly.\n* Select a file from the list of files and folders.”

What am I doing wrong here? Are you not able to save using network drives in automation?

I can save it fine on my local hard drive….. and like I said before I have all the permissions I need to that network directory

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:59:33+00:00Added an answer on May 23, 2026 at 5:59 pm

    Well…. The problem seemed to be that the server and the wd.ActiveDocument.SaveAs didn’t get along too well… so I ended up saving the document elsewhere and programmatically copying the file to the destination that it needed to go to, instead of SAVING it to the destination directly

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to embed a PDF file into a Word document using the OLE
I'm trying to create a fairly simple macro in Word 2010 using Visual Basic.
I am trying to open a word document using window.open as below window.open(myworddoc.doc); It
I'm trying to serve a word document (docx) from an asp.net page using the
i am trying to access some information from a running Microsoft Word application using
I am trying to add bookmarks in word document using C# but it doesn't
I am trying to edit a word document from VB.NET using for the most
I'm trying to search for a partial word using Solr, but I can't get
I am trying to create a word document from a java application and am
I'm trying to start Microsoft word using QProcess as following: QString program = WINWORD.EXE;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.