Skip to content

Commit f706939

Browse files
authored
Merge pull request #574 from DharanyaSakthivel-SF4210/main
ES-1042617 Revamp Getting Started page for Word library in Documentation
2 parents 3650c1d + 4b9a295 commit f706939

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

Getting-Started/ASP.NET-Core/Create-Word-Document/Controllers/HomeController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public ActionResult CreateDocument()
242242
stream.Position = 0;
243243

244244
//Download Word document in the browser.
245-
return File(stream, "application/msword", "Sample.docx");
245+
return File(stream, "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Sample.docx");
246246
}
247247
}
248248

Getting-Started/AWS/Console_Application/Create-Word-Document/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ static void Main(string[] args)
3838
//Read the response stream
3939
var stream = new StreamReader(response.Payload);
4040
JsonReader reader = new JsonTextReader(stream);
41-
var serilizer = new JsonSerializer();
42-
var responseText = serilizer.Deserialize(reader);
41+
var serializer = new JsonSerializer();
42+
var responseText = serializer.Deserialize(reader);
4343

4444
//Convert Base64String into Word document
4545
byte[] bytes = Convert.FromBase64String(responseText.ToString());

Getting-Started/Azure/Azure_App_Service/Create-Word-Document/Controllers/HomeController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public ActionResult CreateWordDocument()
245245
document.Save(stream, FormatType.Docx);
246246

247247
//Download Word document in the browser.
248-
return File(stream, "application/msword", "Sample.docx");
248+
return File(stream, "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Sample.docx");
249249
}
250250
}
251251
public IActionResult Privacy()

Getting-Started/Azure/Azure_Functions/Console_Application/Create-Word-Document/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static void Main(string[] args)
4646
}
4747
catch (Exception ex)
4848
{
49-
throw;
49+
Console.WriteLine("Error: " + ex.Message);
5050
}
5151

5252
//Launch the output Word document

0 commit comments

Comments
 (0)