VegaRise.NET
Back to VDocs

OpenFromWordMethod

Definition

Namespace
DOM
Assembly
VDocs.dll

Opens an existing Word document using a static factory method.

VDocs OpenFromWord(string filename)

Parameters

filename
The full path to the Word document (.docx) to open.

Returns

VDocs

A new instance representing the opened document. VDocs

Remarks

This is a convenience factory method that provides a more fluent API for opening documents. It is functionally equivalent to the constructor. constructor(string)

Examples

csharp
1// Open a document using the factory method
2var doc = VDocs.OpenFromWord("C:\\Documents\\report.docx");
3
4// Modify and save
5var paragraphs = doc.Paragraphs;
6foreach (var p in paragraphs)
7{
8 p.Text = p.Text.Replace("OLD", "NEW");
9}
10doc.SaveAsWord("C:\\Documents\\report_updated.docx");
11
VegaRise.NET

Sign In

Welcome back. Please sign in to your account.

Forgot password?
or

Don't have an account? Create an account

By signing in, you agree to our Terms of Service and Privacy Policy.