Formatting PowerPoint table using VBA very slowUsing conditional format in VBADeleting columns from a table with merged cellsVBA Remove Formatting at End of SheetFixing my macro to copy a range to the next blank column?Excel VBA - Finding the beginning and end of coloured rowsHow to Set Table VAlign and First Row Bolding in Word VBA Style?Can vba format tables by columns rather than by rows or individual cellsPublisher VBA Vertical Text Alignment property not applyingFind a text in a range and copy the next Activecell.offset(1,1)16 cells to destinationautomatically format row/columns vba

From where do electrons gain kinetic energy through a circuit?

If it isn't [someone's name]!

Why should I pay for an SSL certificate?

Is it alright to say good afternoon Sirs and Madams in a panel interview?

Output the list of musical notes

A Magic Diamond

If I am sleeping clutching on to something, how easy is it to steal that item?

Why is the battery jumpered to a resistor in this schematic?

Do I need to start off my book by describing the character's "normal world"?

Heyawacky: Ace of Cups

Reducing contention in thread-safe LruCache

Tikz: The position of a label change step-wise and not in a continuous way

How to prevent criminal gangs from making/buying guns?

How do the Durable and Dwarven Fortitude feats interact?

What exactly happened to the 18 crew members who were reported as "missing" in "Q Who"?

Adjective or adverb before another adjective

Why can't I see 1861 / 1871 census entries on Freecen website when I can see them on Ancestry website?

What is the opposite of "hunger level"?

Is this bar slide trick shown on Cheers real or a visual effect?

Get the full text of a long request

Unconventional examples of mathematical modelling

programming a recursive formula into Mathematica and find the nth position in the sequence

Expressing a chain of boolean ORs using ILP

Regression when x and y each have uncertainties



Formatting PowerPoint table using VBA very slow


Using conditional format in VBADeleting columns from a table with merged cellsVBA Remove Formatting at End of SheetFixing my macro to copy a range to the next blank column?Excel VBA - Finding the beginning and end of coloured rowsHow to Set Table VAlign and First Row Bolding in Word VBA Style?Can vba format tables by columns rather than by rows or individual cellsPublisher VBA Vertical Text Alignment property not applyingFind a text in a range and copy the next Activecell.offset(1,1)16 cells to destinationautomatically format row/columns vba






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm using VBA to create a table with very specific formatting. For some reason adding a 10x18 table takes about 10 seconds. That seems overly long, but I can't find out why. Any ideas on how to speed this up?



I think it might have to do with PowerPoint trying to render each change. I'd love to be able to just create the table, and only then to display it.



Public Sub format_planning_table(tbl As Table, isNew As Boolean)
Dim row, col As Integer

'First do default formatting so we don't have to change everything
format_table tbl, isNew, 11

With tbl

.Cell(1, 1).Shape.Fill.Transparency = 0
.Cell(1, 1).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent2

'Set column widths
.Columns(1).width = 130.1576
.Columns(2).width = 137.4546
.Columns(3).width = 53.09087
For col = 4 To .Columns.Count
.Columns(col).width = 38.31606
Next col

'Set height for top two rows
.Rows(1).height = 20.4
.Rows(2).height = 20.4
For col = 1 To .Columns.Count
'Format top row (some merged cells)
.Cell(1, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent5
.Cell(2, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent5
.Cell(1, col).Shape.TextFrame.VerticalAnchor = msoAnchorMiddle 'Vertical alignment to middle
.Cell(2, col).Shape.TextFrame.VerticalAnchor = msoAnchorMiddle 'Vertical alignment to middle
.Cell(2, col).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
.Cell(2, col).Shape.TextFrame.TextRange.Font.Bold = msoTrue

'Weeks
If col >= 4 Then
.Cell(1, col).Shape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter 'Horizontal alignment center
.Cell(2, col).Shape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter 'Horizontal alignment center

'Set alternating shading. 1 is gray, 0 is white
For row = 3 To .Rows.Count
If .Cell(3, col).Shape.TextFrame.TextRange.Text = "@@1" Then
.Cell(row, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorLight1
End If
.Rows(row).Cells.Borders(ppBorderLeft).Transparency = 1 'Remove border.

Next row
.Cell(3, col).Shape.TextFrame.TextRange.Text = "" 'Empty the temporary text

End If
Next col

'For the data part, set the bottom border for the entire row, then reset for first two columns
For row = 3 To .Rows.Count
.Cell(row, 1).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
.Cell(row, 2).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
With .Rows(row).Cells.Borders(ppBorderBottom)
.DashStyle = 11
.Weight = 1.5
.ForeColor.ObjectThemeColor = msoThemeColorText1
End With
With .Cell(row, 1).Borders(ppBorderBottom) 'Reset first column
.DashStyle = msoLineSolid
.Weight = 2.25
.ForeColor.ObjectThemeColor = msoThemeColorLight1
End With
With .Cell(row, 2).Borders(ppBorderBottom) 'Reset second column
.DashStyle = msoLineSolid
.Weight = 2.25
.ForeColor.ObjectThemeColor = msoThemeColorLight1
End With
Next row
End With
End Sub


I'm setting some column widths with hard values. I know that's ugly, but it'll do for now.










share|improve this question



















  • 1





    That runs reasonably quickly for me, how long does format_table take? You could work with FirstRow, LastCol etc to improve it slightly. You could consider have a hidden slide with an empty table already created that you could just copy when you need a new one.

    – Andy G
    Mar 27 at 13:40











  • Both format_table and format_planning_table take about 10 seconds, for a table thats 10x18 (although that does include the time for creating the table in the first place). I like the idea of having an empty (formatted) table ready, and just copying that in.

    – JackStoneS
    Mar 27 at 13:44











  • I suppose you could also consider starting with a table with just 2 or 3 rows, formatting it (with banded rows) then, eventually, add some more rows to it. I would go with copying first.

    – Andy G
    Mar 27 at 13:45

















0















I'm using VBA to create a table with very specific formatting. For some reason adding a 10x18 table takes about 10 seconds. That seems overly long, but I can't find out why. Any ideas on how to speed this up?



I think it might have to do with PowerPoint trying to render each change. I'd love to be able to just create the table, and only then to display it.



Public Sub format_planning_table(tbl As Table, isNew As Boolean)
Dim row, col As Integer

'First do default formatting so we don't have to change everything
format_table tbl, isNew, 11

With tbl

.Cell(1, 1).Shape.Fill.Transparency = 0
.Cell(1, 1).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent2

'Set column widths
.Columns(1).width = 130.1576
.Columns(2).width = 137.4546
.Columns(3).width = 53.09087
For col = 4 To .Columns.Count
.Columns(col).width = 38.31606
Next col

'Set height for top two rows
.Rows(1).height = 20.4
.Rows(2).height = 20.4
For col = 1 To .Columns.Count
'Format top row (some merged cells)
.Cell(1, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent5
.Cell(2, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent5
.Cell(1, col).Shape.TextFrame.VerticalAnchor = msoAnchorMiddle 'Vertical alignment to middle
.Cell(2, col).Shape.TextFrame.VerticalAnchor = msoAnchorMiddle 'Vertical alignment to middle
.Cell(2, col).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
.Cell(2, col).Shape.TextFrame.TextRange.Font.Bold = msoTrue

'Weeks
If col >= 4 Then
.Cell(1, col).Shape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter 'Horizontal alignment center
.Cell(2, col).Shape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter 'Horizontal alignment center

'Set alternating shading. 1 is gray, 0 is white
For row = 3 To .Rows.Count
If .Cell(3, col).Shape.TextFrame.TextRange.Text = "@@1" Then
.Cell(row, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorLight1
End If
.Rows(row).Cells.Borders(ppBorderLeft).Transparency = 1 'Remove border.

Next row
.Cell(3, col).Shape.TextFrame.TextRange.Text = "" 'Empty the temporary text

End If
Next col

'For the data part, set the bottom border for the entire row, then reset for first two columns
For row = 3 To .Rows.Count
.Cell(row, 1).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
.Cell(row, 2).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
With .Rows(row).Cells.Borders(ppBorderBottom)
.DashStyle = 11
.Weight = 1.5
.ForeColor.ObjectThemeColor = msoThemeColorText1
End With
With .Cell(row, 1).Borders(ppBorderBottom) 'Reset first column
.DashStyle = msoLineSolid
.Weight = 2.25
.ForeColor.ObjectThemeColor = msoThemeColorLight1
End With
With .Cell(row, 2).Borders(ppBorderBottom) 'Reset second column
.DashStyle = msoLineSolid
.Weight = 2.25
.ForeColor.ObjectThemeColor = msoThemeColorLight1
End With
Next row
End With
End Sub


I'm setting some column widths with hard values. I know that's ugly, but it'll do for now.










share|improve this question



















  • 1





    That runs reasonably quickly for me, how long does format_table take? You could work with FirstRow, LastCol etc to improve it slightly. You could consider have a hidden slide with an empty table already created that you could just copy when you need a new one.

    – Andy G
    Mar 27 at 13:40











  • Both format_table and format_planning_table take about 10 seconds, for a table thats 10x18 (although that does include the time for creating the table in the first place). I like the idea of having an empty (formatted) table ready, and just copying that in.

    – JackStoneS
    Mar 27 at 13:44











  • I suppose you could also consider starting with a table with just 2 or 3 rows, formatting it (with banded rows) then, eventually, add some more rows to it. I would go with copying first.

    – Andy G
    Mar 27 at 13:45













0












0








0








I'm using VBA to create a table with very specific formatting. For some reason adding a 10x18 table takes about 10 seconds. That seems overly long, but I can't find out why. Any ideas on how to speed this up?



I think it might have to do with PowerPoint trying to render each change. I'd love to be able to just create the table, and only then to display it.



Public Sub format_planning_table(tbl As Table, isNew As Boolean)
Dim row, col As Integer

'First do default formatting so we don't have to change everything
format_table tbl, isNew, 11

With tbl

.Cell(1, 1).Shape.Fill.Transparency = 0
.Cell(1, 1).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent2

'Set column widths
.Columns(1).width = 130.1576
.Columns(2).width = 137.4546
.Columns(3).width = 53.09087
For col = 4 To .Columns.Count
.Columns(col).width = 38.31606
Next col

'Set height for top two rows
.Rows(1).height = 20.4
.Rows(2).height = 20.4
For col = 1 To .Columns.Count
'Format top row (some merged cells)
.Cell(1, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent5
.Cell(2, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent5
.Cell(1, col).Shape.TextFrame.VerticalAnchor = msoAnchorMiddle 'Vertical alignment to middle
.Cell(2, col).Shape.TextFrame.VerticalAnchor = msoAnchorMiddle 'Vertical alignment to middle
.Cell(2, col).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
.Cell(2, col).Shape.TextFrame.TextRange.Font.Bold = msoTrue

'Weeks
If col >= 4 Then
.Cell(1, col).Shape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter 'Horizontal alignment center
.Cell(2, col).Shape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter 'Horizontal alignment center

'Set alternating shading. 1 is gray, 0 is white
For row = 3 To .Rows.Count
If .Cell(3, col).Shape.TextFrame.TextRange.Text = "@@1" Then
.Cell(row, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorLight1
End If
.Rows(row).Cells.Borders(ppBorderLeft).Transparency = 1 'Remove border.

Next row
.Cell(3, col).Shape.TextFrame.TextRange.Text = "" 'Empty the temporary text

End If
Next col

'For the data part, set the bottom border for the entire row, then reset for first two columns
For row = 3 To .Rows.Count
.Cell(row, 1).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
.Cell(row, 2).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
With .Rows(row).Cells.Borders(ppBorderBottom)
.DashStyle = 11
.Weight = 1.5
.ForeColor.ObjectThemeColor = msoThemeColorText1
End With
With .Cell(row, 1).Borders(ppBorderBottom) 'Reset first column
.DashStyle = msoLineSolid
.Weight = 2.25
.ForeColor.ObjectThemeColor = msoThemeColorLight1
End With
With .Cell(row, 2).Borders(ppBorderBottom) 'Reset second column
.DashStyle = msoLineSolid
.Weight = 2.25
.ForeColor.ObjectThemeColor = msoThemeColorLight1
End With
Next row
End With
End Sub


I'm setting some column widths with hard values. I know that's ugly, but it'll do for now.










share|improve this question














I'm using VBA to create a table with very specific formatting. For some reason adding a 10x18 table takes about 10 seconds. That seems overly long, but I can't find out why. Any ideas on how to speed this up?



I think it might have to do with PowerPoint trying to render each change. I'd love to be able to just create the table, and only then to display it.



Public Sub format_planning_table(tbl As Table, isNew As Boolean)
Dim row, col As Integer

'First do default formatting so we don't have to change everything
format_table tbl, isNew, 11

With tbl

.Cell(1, 1).Shape.Fill.Transparency = 0
.Cell(1, 1).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent2

'Set column widths
.Columns(1).width = 130.1576
.Columns(2).width = 137.4546
.Columns(3).width = 53.09087
For col = 4 To .Columns.Count
.Columns(col).width = 38.31606
Next col

'Set height for top two rows
.Rows(1).height = 20.4
.Rows(2).height = 20.4
For col = 1 To .Columns.Count
'Format top row (some merged cells)
.Cell(1, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent5
.Cell(2, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent5
.Cell(1, col).Shape.TextFrame.VerticalAnchor = msoAnchorMiddle 'Vertical alignment to middle
.Cell(2, col).Shape.TextFrame.VerticalAnchor = msoAnchorMiddle 'Vertical alignment to middle
.Cell(2, col).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
.Cell(2, col).Shape.TextFrame.TextRange.Font.Bold = msoTrue

'Weeks
If col >= 4 Then
.Cell(1, col).Shape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter 'Horizontal alignment center
.Cell(2, col).Shape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter 'Horizontal alignment center

'Set alternating shading. 1 is gray, 0 is white
For row = 3 To .Rows.Count
If .Cell(3, col).Shape.TextFrame.TextRange.Text = "@@1" Then
.Cell(row, col).Shape.Fill.ForeColor.ObjectThemeColor = msoThemeColorLight1
End If
.Rows(row).Cells.Borders(ppBorderLeft).Transparency = 1 'Remove border.

Next row
.Cell(3, col).Shape.TextFrame.TextRange.Text = "" 'Empty the temporary text

End If
Next col

'For the data part, set the bottom border for the entire row, then reset for first two columns
For row = 3 To .Rows.Count
.Cell(row, 1).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
.Cell(row, 2).Shape.TextFrame.TextRange.Font.Color.ObjectThemeColor = msoThemeColorLight1
With .Rows(row).Cells.Borders(ppBorderBottom)
.DashStyle = 11
.Weight = 1.5
.ForeColor.ObjectThemeColor = msoThemeColorText1
End With
With .Cell(row, 1).Borders(ppBorderBottom) 'Reset first column
.DashStyle = msoLineSolid
.Weight = 2.25
.ForeColor.ObjectThemeColor = msoThemeColorLight1
End With
With .Cell(row, 2).Borders(ppBorderBottom) 'Reset second column
.DashStyle = msoLineSolid
.Weight = 2.25
.ForeColor.ObjectThemeColor = msoThemeColorLight1
End With
Next row
End With
End Sub


I'm setting some column widths with hard values. I know that's ugly, but it'll do for now.







vba powerpoint






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 27 at 13:23









JackStoneSJackStoneS

3931 silver badge6 bronze badges




3931 silver badge6 bronze badges










  • 1





    That runs reasonably quickly for me, how long does format_table take? You could work with FirstRow, LastCol etc to improve it slightly. You could consider have a hidden slide with an empty table already created that you could just copy when you need a new one.

    – Andy G
    Mar 27 at 13:40











  • Both format_table and format_planning_table take about 10 seconds, for a table thats 10x18 (although that does include the time for creating the table in the first place). I like the idea of having an empty (formatted) table ready, and just copying that in.

    – JackStoneS
    Mar 27 at 13:44











  • I suppose you could also consider starting with a table with just 2 or 3 rows, formatting it (with banded rows) then, eventually, add some more rows to it. I would go with copying first.

    – Andy G
    Mar 27 at 13:45












  • 1





    That runs reasonably quickly for me, how long does format_table take? You could work with FirstRow, LastCol etc to improve it slightly. You could consider have a hidden slide with an empty table already created that you could just copy when you need a new one.

    – Andy G
    Mar 27 at 13:40











  • Both format_table and format_planning_table take about 10 seconds, for a table thats 10x18 (although that does include the time for creating the table in the first place). I like the idea of having an empty (formatted) table ready, and just copying that in.

    – JackStoneS
    Mar 27 at 13:44











  • I suppose you could also consider starting with a table with just 2 or 3 rows, formatting it (with banded rows) then, eventually, add some more rows to it. I would go with copying first.

    – Andy G
    Mar 27 at 13:45







1




1





That runs reasonably quickly for me, how long does format_table take? You could work with FirstRow, LastCol etc to improve it slightly. You could consider have a hidden slide with an empty table already created that you could just copy when you need a new one.

– Andy G
Mar 27 at 13:40





That runs reasonably quickly for me, how long does format_table take? You could work with FirstRow, LastCol etc to improve it slightly. You could consider have a hidden slide with an empty table already created that you could just copy when you need a new one.

– Andy G
Mar 27 at 13:40













Both format_table and format_planning_table take about 10 seconds, for a table thats 10x18 (although that does include the time for creating the table in the first place). I like the idea of having an empty (formatted) table ready, and just copying that in.

– JackStoneS
Mar 27 at 13:44





Both format_table and format_planning_table take about 10 seconds, for a table thats 10x18 (although that does include the time for creating the table in the first place). I like the idea of having an empty (formatted) table ready, and just copying that in.

– JackStoneS
Mar 27 at 13:44













I suppose you could also consider starting with a table with just 2 or 3 rows, formatting it (with banded rows) then, eventually, add some more rows to it. I would go with copying first.

– Andy G
Mar 27 at 13:45





I suppose you could also consider starting with a table with just 2 or 3 rows, formatting it (with banded rows) then, eventually, add some more rows to it. I would go with copying first.

– Andy G
Mar 27 at 13:45












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55378289%2fformatting-powerpoint-table-using-vba-very-slow%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55378289%2fformatting-powerpoint-table-using-vba-very-slow%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript