Bit of a long winded process but its the only way I could get this working.
- I have code that will generate a word document for me, using data within access.
- I have code that will insert new lines to a table from excel to word using a linked access table.
I cant insert into a table directly from access as it has formatting issues im unable to resolve.
So what I want is to have some code in access that will open the excel file and run the macro using the file name that I have just created.
Im happy to have a go at this, im sure ill have problems but ill get it somewhere near working.
Just after some advice/thoughts before I start working on this. Is this bad practice? are there better alternatives?
I'd be looking initially at this post here for some guidance:
https://stackoverflow.com/questions/...m-command-line
Im not comortable with using the newly generated file name as a variable either from excel.
So in access i have this:Is there a way I can use this variable in excel (from access).Code:' New File Name sNewFile = "RAM_" & Me.Site_Name & "_" & Me.Site_ID & "_" & Me.RAMS_ISSUE & ".docx"
feel free to ask questions if i haven't been clear.
Thanks.